sorry, I miss typed w_buff... it is the same table name.
Main Topics
Browse All TopicsI 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.record
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
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Are you not familiar with the ADO object model? What about Google?
Never mind here are some links:
INFO: Extracting Error Information from ADO in VB
http://support.microsoft.c
W3Schools: Error Object
http://www.w3schools.com/a
Handling Errors and Messages in ADO
http://msdn.microsoft.com/
http://www.experts-exchang
Award points to http:#a25485974
Business Accounts
Answer for Membership
by: angelIIIPosted on 2009-10-03 at 10:06:31ID: 25485974
if both tables are on the same database/server, why not UPDATE directly without recordsets? e.com/arti cles/Datab ase/ Miscel laneous/UP DATES-with -JOIN-for- everybody. html
http://www.experts-exchang