"Update Conflict" message when modifying SQL Server data (198606)
The information in this article applies to:
- Microsoft Visual FoxPro for Macintosh 3.0b
- Microsoft Visual FoxPro for Windows 3.0
- Microsoft Visual FoxPro for Windows 3.0b
- Microsoft Visual FoxPro for Windows 5.0
- Microsoft Visual FoxPro for Windows 5.0a
- Microsoft Visual FoxPro for Windows 6.0
- Microsoft Visual FoxPro for Windows 7.0
- Microsoft Visual FoxPro 8.0
- Microsoft Visual FoxPro 9.0 Professional Edition
This article was previously published under Q198606 SYMPTOMS An "Update Conflict" message appears when attempting to
modify or delete a record, contained in an updatable cursor, SELECTed from a
SQL Server table. CAUSE This behavior occurs when SQL Server does not return a
message indicating the number of rows returned by a statement. SQL Server does
not return a message indicating the number of rows affected by a statement
after the following commands have been executed on SQL Server:
sp_configure "user options", 512
SET NOCOUNT ON
RESOLUTION Check the value of SQL Server's global user options
configuration setting, before allowing manipulation of SQL Server tables
through an updateable cursor. The following code snippet illustrates
how to obtain the current global SQL Server "user options" configuration
setting
and assumes that the user has the appropriate permissions:
Sample Code
gnConnHandle=SQLSTRINGCONN('DRIVER={SQL Server};' + ;
'SERVER=SPHINXSQL;DATABASE=ALMIS;UID=UserName;PWD=StrongPassword')
sqlcommand="USE ALMIS"
=SQLEXEC(gnConnHandle,sqlcommand)
testval=0
sqlcommand="sp_configure 'user options'"
testval=SQLEXEC(gnConnHandle,sqlcommand,'mytest')
oldvalue=0
IF testval>0
SELECT mytest
oldvalue=config_value
BROW
ENDIF
IF oldvalue<>512
* Insert code here that would allow the user to view and modify data
* contained in an updateable cursor.
ELSE
* Insert code here that would allow the user to view but not modify
* data in a cursor.
ENDIF
=SQLDISCONNECT(gnConnHandle)
REFERENCES SQL Reference Help; search on: "sp_configure"
SQL Reference Help; search on: "SET"
(c) Microsoft Corporation 1998,
All Rights Reserved. Contributions by John Desch, Microsoft Corporation.
Modification Type: | Major | Last Reviewed: | 4/15/2005 |
---|
Keywords: | KbClientServer kbDatabase kbpending kbprb KB198606 kbAudDeveloper |
---|
|