Problem on SQL-Update Statement with a Data-Control in VB 5 and SQL Server 7.0 
Author Message
 Problem on SQL-Update Statement with a Data-Control in VB 5 and SQL Server 7.0

Im using the Data-Control in VB-5 and connect to a SQL-Server 7 using
the DAO-Type. If I change a record, the ODBC-Driver generates an SQL-
Statement like the following:

Update POS Set Pos_TEXT = 'Monitor' WHERE xxx = xxx, xxx = xxx

The Kriteria for the Record is including all other Fields of the
record and not only the Key-Column.

Has anyone an idear?

Mfg Robert Holzmann
Austria / Salzburg



Mon, 25 Mar 2002 03:00:00 GMT  
 Problem on SQL-Update Statement with a Data-Control in VB 5 and SQL Server 7.0

That comes from using Optimistic Locking by Row Values.
This method of locking allows the UPDATE statement to fail gracefully when someone else has edited the row you are trying to update between the time when you read the row and the time you try to update it.

Read up on locking strategies particularly Optimistic Locking by Row ID which may be better for your application.

Regards,
Simon Jones
MillStream Designs Ltd
Independent IT Consultants


  Im using the Data-Control in VB-5 and connect to a SQL-Server 7 using
  the DAO-Type. If I change a record, the ODBC-Driver generates an SQL-
  Statement like the following:

  Update POS Set Pos_TEXT = 'Monitor' WHERE xxx = xxx, xxx = xxx

  The Kriteria for the Record is including all other Fields of the
  record and not only the Key-Column.

  Has anyone an idear?

  Mfg Robert Holzmann
  Austria / Salzburg



Mon, 25 Mar 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. VB 3.0 with SQL SERVER 7.0 (Update, delete and Insert)

2. Updating Dates in SQL-Server 7.0 Stored Proc thru VB.

3. VB 3.0 with SQL SERVER 7.0 (Update, delete and Insert)

4. VB Sql Server Via ADO Problem: [Microsoft][ODBC Sql Server Driver]

5. updating a text BLOB in sql server 7.0

6. Updating an ADOR Recordset with SQL Server 7.0

7. Updating an ADOR Recordset with SQL Server 7.0

8. SQL Server 7.0 and ADO Batch Updating (UpdateBatch)

9. DataGrid Control / SQL Server doesn't update data

10. New Transact-SQL Debugger for Microsoft SQL Server 6.5/7.0

11. Insert date type varible through ODBC SQL server driver to SQL 7.0 database

12. SQL Debugger for Microsoft SQL Server 7.0 and 6.5

 

 
Powered by phpBB® Forum Software