Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
kostya
Starting Member
2 Posts |
Posted - 2005-03-08 : 12:14:35
|
Hi,The code below produced the following error:Microsoft OLE DB Provider for ODBC Driver error '80040e23'[Microsoft][ODBC SQL Server Driver]Cursor operation conflictxxx.asp, line 94Code sample:SQL = "Select * from tbl Where sid = " & strIdSet rstT = server.CreateObject("adodb.recordset")rstT.Open SQL,cn,1,3If Not rstT.EOF then rstT("firstName") = strFirst ... rstT.Update 'line 94End IfThe error occures frequently, but not all the time and the row gets updated anyway. Any ideas of what the error means and ways to correct it?The error occurs often (not all the time) and the row gets updated anyway.Would you have some ideas of what the error means and ways to correct it?Thank you, |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2005-03-08 : 12:17:40
|
you have 2 different recordsets: rstT, rstTravel. why?what kind of cursor are you using? 3 is what again??Go with the flow & have fun! Else fight the flow |
 |
|
|
kostya
Starting Member
2 Posts |
Posted - 2005-03-08 : 12:23:45
|
quote: Originally posted by spirit1 you have 2 different recordsets: rstT, rstTravel. why?what kind of cursor are you using? 3 is what again??Go with the flow & have fun! Else fight the flow 
Good catch -- it should be rstT in both cases (I made changes to the sample code above).rstT.Open SQL,cn,1,31=adOpenKeyset - A keyset cursor. Like a dynamic cursor, except that you can't see records that other users add, although records that other users delete are inaccessible from your Recordset. Data changes by other users are still visible.3=adLockOptimistic - Optimistic locking, record by record. The provider lock records only when calling update |
 |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2005-03-08 : 12:38:27
|
then probably two users are trying to update the same record at the same time...Go with the flow & have fun! Else fight the flow |
 |
|
|
Bustaz Kool
Master Smack Fu Yak Hacker
1834 Posts |
Posted - 2005-03-08 : 18:39:24
|
| And why are you using literals instead of the defined constants?HTH=================================================================In order to improve the mind, we ought less to learn than to contemplate.-Rene Descartes, philosopher and mathematician (1596-1650) |
 |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2005-03-08 : 22:37:13
|
| Cause he doesn't feel like linking in the rather large ADO include file with every ASP page? I know I didn't. |
 |
|
|
|
|
|
|
|