[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details

SQL updates error messages

Asked by mshox1 in SQL Server 2005

Tags: sql applications

I using the record setup to update the SQL data base,  99.99% the time works well.  Recently I encountered an error message like following:

[Microsoft][ODBC SQL Server Driver][SQL Server]Optimistic concurrency check failed. The row was modified outside of this cursor

my questions are:
1. what this error message means, how it occurs (under what conditions)
2. how to recovery it after catch this type of error?
3. what is the best practice to do this?
4. Looking for your input and suggestions.

thanks

-------------------------------

Here is my code templet I am using.

dim rs_x as recordset
dim SQLStr as string

set rs_x = createobject("adodb.recordset")
on error goto sql_err
strSQL = "select * from a_table where fields = 'xxx'"
SQLStr = "select * from w_buff order by to_email"
 rs_x.Open strSQL, conn_dbl, adOpenKeyset, adLockOptimistic

' I am using adLockOptimistic' control
if rs_x.bof = true and rs_x.eof = true then
     rs_x.addNew
   endif
rs_x.fields("x1") = "something"
rs_x.update
rs_x.close
exit sub

err_sql:

debug.print err.description

'  handle the error

etc



[+][-]10/03/09 10:06 AM, ID: 25485974Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/03/09 10:47 AM, ID: 25486111Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/03/09 10:53 AM, ID: 25486131Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/03/09 11:01 AM, ID: 25486184Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/03/09 11:03 AM, ID: 25486198Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/03/09 11:43 AM, ID: 25486353Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/03/09 11:45 AM, ID: 25486366Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/04/09 07:28 PM, ID: 25492141Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/07/09 04:01 AM, ID: 25513969Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/07/09 04:38 PM, ID: 25521296Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11/03/09 01:21 PM, ID: 25733843Administrative Comment

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 30-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]11/03/09 03:34 PM, ID: 25735074Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-89 - Hierarchy / EE_QW_3_20080625