I've got a Windows 2003 SERVER SP1 running sql server 2000 SP4 that is
doing something I've never seen before. Regardless of what database or
table, if I add a new record or try to update a record using an
ADODB.Recordset, I get a CURSOR OPERATION CONFLICT error. This same
code works fine at about 50 other client sites running a similar
environment so I have a feeling there is something wrong with this
particular sql server. The same error occurs on any machine I run the
code on that hits that particular sql server so I don't think it's a
MDAC issue. If I change the cursor location to adUseClient, it works
but that's not a solution for me because it would require alot of code
changes and since this code works fine at other sites, I don't think
that is the solution. Anyone ever encountered a similar issue?
Here's a quick example of how I can reproduce the error, this is just a
vbscript demonstrating the problem:
set cnn=CreateObject("ADODB.Connection")
set rs=CreateObject("ADODB.Recordset")
cnn.open strConnectionString
'Opening it as adOpenKeyset, adLockOptmisitc
rs.Open "Select * From [test]", cnn,1, 3
rs.AddNew
rs.fields("Description").value="test2"
'getting error when the update is called Cursor Operation Conflict
rs.update
rs.close
msgbox "done"
'Windows 2003 Server Standard Edition SERVICE PACK1
'SQL SERVER 2000 SP4
'MDAC VERSION 2.8
I solved the problem.. Another company shares the same sql server that
we use for our application and they had many of the settings under the
"Default Connection Options" (which is under the SQL SERVER
Settings->Connections options tab) checked off, I unchecked all of them
(which is the way it is by default when sql server is installed) and
that cleared up the problem.
|||Just for the record: it seems that it was the "No count" attribute that
was causing the problem. This can be set using:
EXEC sp_configure 'user options', 512
Apparently, all server-side cursors in ADO rely on the number of
affected rows which is returned after the execution of certain
statements. Setting the "No count" attribute in "Default connection
options" (which is equivalent to executing "SET NOCOUNT ON" in each
connection that is opened) suppresses those messages, so ADO gets
confused.
For more informations, see:
http://support.microsoft.com/default...B;EN-US;195491
Razvan
Showing posts with label conflict. Show all posts
Showing posts with label conflict. Show all posts
Tuesday, March 27, 2012
Cursor Operation Conflict
I keep getting a cursor operation conflict when calling the "Update" method
of a recordsetup object using VB6 with a SQL Server 2000 DB. I have 0
"INSTEAD OF" triggers in the database, my user options are set to 0. I am
running MDAC 2.81.117.0 on a Win XP SP2 machine against a Win 2003 Server
with SQL Server 2000 SP 4. This didn't happen in previous versions of our
software, indicating to me that the software has changed somewhere. I've
looked through the software and nothing different stands out. If I change t
o
a client-side cursor it works ok. The data is still saved with a server sid
e
cursor, but I get the error message "Cursor Operation Conflict". There are
no triggers on the table that I'm inserting into.UPDATE: I'm now using a "NOT IN" in one portion of our software and that
seems to be causing the cursor operation conflict in other portions of the
software. I'm not sure why, but my syntax is "KeyField NOT IN (400, 390)",
which the records return fine both in VB and Query Analyzer, but when I try
to add/update a record in other parts of the software then I get the error.
If I exclude the "NOT IN" then no errors elsewhere.
"John Estrada" wrote:
> I keep getting a cursor operation conflict when calling the "Update" metho
d
> of a recordsetup object using VB6 with a SQL Server 2000 DB. I have 0
> "INSTEAD OF" triggers in the database, my user options are set to 0. I am
> running MDAC 2.81.117.0 on a Win XP SP2 machine against a Win 2003 Server
> with SQL Server 2000 SP 4. This didn't happen in previous versions of our
> software, indicating to me that the software has changed somewhere. I've
> looked through the software and nothing different stands out. If I change
to
> a client-side cursor it works ok. The data is still saved with a server s
ide
> cursor, but I get the error message "Cursor Operation Conflict". There ar
e
> no triggers on the table that I'm inserting into.
of a recordsetup object using VB6 with a SQL Server 2000 DB. I have 0
"INSTEAD OF" triggers in the database, my user options are set to 0. I am
running MDAC 2.81.117.0 on a Win XP SP2 machine against a Win 2003 Server
with SQL Server 2000 SP 4. This didn't happen in previous versions of our
software, indicating to me that the software has changed somewhere. I've
looked through the software and nothing different stands out. If I change t
o
a client-side cursor it works ok. The data is still saved with a server sid
e
cursor, but I get the error message "Cursor Operation Conflict". There are
no triggers on the table that I'm inserting into.UPDATE: I'm now using a "NOT IN" in one portion of our software and that
seems to be causing the cursor operation conflict in other portions of the
software. I'm not sure why, but my syntax is "KeyField NOT IN (400, 390)",
which the records return fine both in VB and Query Analyzer, but when I try
to add/update a record in other parts of the software then I get the error.
If I exclude the "NOT IN" then no errors elsewhere.
"John Estrada" wrote:
> I keep getting a cursor operation conflict when calling the "Update" metho
d
> of a recordsetup object using VB6 with a SQL Server 2000 DB. I have 0
> "INSTEAD OF" triggers in the database, my user options are set to 0. I am
> running MDAC 2.81.117.0 on a Win XP SP2 machine against a Win 2003 Server
> with SQL Server 2000 SP 4. This didn't happen in previous versions of our
> software, indicating to me that the software has changed somewhere. I've
> looked through the software and nothing different stands out. If I change
to
> a client-side cursor it works ok. The data is still saved with a server s
ide
> cursor, but I get the error message "Cursor Operation Conflict". There ar
e
> no triggers on the table that I'm inserting into.
CURSOR OPERATION CONFLICT
I've got a Windows 2003 SERVER SP1 running sql server 2000 SP4 that is
doing something I've never seen before. Regardless of what database or
table, if I add a new record or try to update a record using an
ADODB.Recordset, I get a CURSOR OPERATION CONFLICT error. This same
code works fine at about 50 other client sites running a similar
environment so I have a feeling there is something wrong with this
particular sql server. The same error occurs on any machine I run the
code on that hits that particular sql server so I don't think it's a
MDAC issue. If I change the cursor location to adUseClient, it works
but that's not a solution for me because it would require alot of code
changes and since this code works fine at other sites, I don't think
that is the solution. Anyone ever encountered a similar issue?
Here's a quick example of how I can reproduce the error, this is just a
vbscript demonstrating the problem:
set cnn=CreateObject("ADODB.Connection")
set rs=CreateObject("ADODB.Recordset")
cnn.open strConnectionString
'Opening it as adOpenKeyset, adLockOptmisitc
rs.Open "Select * From [test]", cnn,1, 3
rs.AddNew
rs.fields("Description").value="test2"
'getting error when the update is called Cursor Operation Conflict
rs.update
rs.close
msgbox "done"
'Windows 2003 Server Standard Edition SERVICE PACK1
'SQL SERVER 2000 SP4
'MDAC VERSION 2.8I solved the problem.. Another company shares the same sql server that
we use for our application and they had many of the settings under the
"Default Connection Options" (which is under the SQL SERVER
Settings->Connections options tab) checked off, I unchecked all of them
(which is the way it is by default when sql server is installed) and
that cleared up the problem.|||Just for the record: it seems that it was the "No count" attribute that
was causing the problem. This can be set using:
EXEC sp_configure 'user options', 512
Apparently, all server-side cursors in ADO rely on the number of
affected rows which is returned after the execution of certain
statements. Setting the "No count" attribute in "Default connection
options" (which is equivalent to executing "SET NOCOUNT ON" in each
connection that is opened) suppresses those messages, so ADO gets
confused.
For more informations, see:
http://support.microsoft.com/defaul...KB;EN-US;195491
Razvansql
doing something I've never seen before. Regardless of what database or
table, if I add a new record or try to update a record using an
ADODB.Recordset, I get a CURSOR OPERATION CONFLICT error. This same
code works fine at about 50 other client sites running a similar
environment so I have a feeling there is something wrong with this
particular sql server. The same error occurs on any machine I run the
code on that hits that particular sql server so I don't think it's a
MDAC issue. If I change the cursor location to adUseClient, it works
but that's not a solution for me because it would require alot of code
changes and since this code works fine at other sites, I don't think
that is the solution. Anyone ever encountered a similar issue?
Here's a quick example of how I can reproduce the error, this is just a
vbscript demonstrating the problem:
set cnn=CreateObject("ADODB.Connection")
set rs=CreateObject("ADODB.Recordset")
cnn.open strConnectionString
'Opening it as adOpenKeyset, adLockOptmisitc
rs.Open "Select * From [test]", cnn,1, 3
rs.AddNew
rs.fields("Description").value="test2"
'getting error when the update is called Cursor Operation Conflict
rs.update
rs.close
msgbox "done"
'Windows 2003 Server Standard Edition SERVICE PACK1
'SQL SERVER 2000 SP4
'MDAC VERSION 2.8I solved the problem.. Another company shares the same sql server that
we use for our application and they had many of the settings under the
"Default Connection Options" (which is under the SQL SERVER
Settings->Connections options tab) checked off, I unchecked all of them
(which is the way it is by default when sql server is installed) and
that cleared up the problem.|||Just for the record: it seems that it was the "No count" attribute that
was causing the problem. This can be set using:
EXEC sp_configure 'user options', 512
Apparently, all server-side cursors in ADO rely on the number of
affected rows which is returned after the execution of certain
statements. Setting the "No count" attribute in "Default connection
options" (which is equivalent to executing "SET NOCOUNT ON" in each
connection that is opened) suppresses those messages, so ADO gets
confused.
For more informations, see:
http://support.microsoft.com/defaul...KB;EN-US;195491
Razvansql
CURSOR OPERATION CONFLICT
I've got a Windows 2003 SERVER SP1 running sql server 2000 SP4 that is
doing something I've never seen before. Regardless of what database or
table, if I add a new record or try to update a record using an
ADODB.Recordset, I get a CURSOR OPERATION CONFLICT error. This same
code works fine at about 50 other client sites running a similar
environment so I have a feeling there is something wrong with this
particular sql server. The same error occurs on any machine I run the
code on that hits that particular sql server so I don't think it's a
MDAC issue. If I change the cursor location to adUseClient, it works
but that's not a solution for me because it would require alot of code
changes and since this code works fine at other sites, I don't think
that is the solution. Anyone ever encountered a similar issue?
Here's a quick example of how I can reproduce the error, this is just a
vbscript demonstrating the problem:
set cnn=CreateObject("ADODB.Connection")
set rs=CreateObject("ADODB.Recordset")
cnn.open strConnectionString
'Opening it as adOpenKeyset, adLockOptmisitc
rs.Open "Select * From [test]", cnn,1, 3
rs.AddNew
rs.fields("Description").value="test2"
'getting error when the update is called Cursor Operation Conflict
rs.update
rs.close
msgbox "done"
'Windows 2003 Server Standard Edition SERVICE PACK1
'SQL SERVER 2000 SP4
'MDAC VERSION 2.8I solved the problem.. Another company shares the same sql server that
we use for our application and they had many of the settings under the
"Default Connection Options" (which is under the SQL SERVER
Settings->Connections options tab) checked off, I unchecked all of them
(which is the way it is by default when sql server is installed) and
that cleared up the problem.|||Just for the record: it seems that it was the "No count" attribute that
was causing the problem. This can be set using:
EXEC sp_configure 'user options', 512
Apparently, all server-side cursors in ADO rely on the number of
affected rows which is returned after the execution of certain
statements. Setting the "No count" attribute in "Default connection
options" (which is equivalent to executing "SET NOCOUNT ON" in each
connection that is opened) suppresses those messages, so ADO gets
confused.
For more informations, see:
http://support.microsoft.com/default.aspx?scid=KB;EN-US;195491
Razvan
doing something I've never seen before. Regardless of what database or
table, if I add a new record or try to update a record using an
ADODB.Recordset, I get a CURSOR OPERATION CONFLICT error. This same
code works fine at about 50 other client sites running a similar
environment so I have a feeling there is something wrong with this
particular sql server. The same error occurs on any machine I run the
code on that hits that particular sql server so I don't think it's a
MDAC issue. If I change the cursor location to adUseClient, it works
but that's not a solution for me because it would require alot of code
changes and since this code works fine at other sites, I don't think
that is the solution. Anyone ever encountered a similar issue?
Here's a quick example of how I can reproduce the error, this is just a
vbscript demonstrating the problem:
set cnn=CreateObject("ADODB.Connection")
set rs=CreateObject("ADODB.Recordset")
cnn.open strConnectionString
'Opening it as adOpenKeyset, adLockOptmisitc
rs.Open "Select * From [test]", cnn,1, 3
rs.AddNew
rs.fields("Description").value="test2"
'getting error when the update is called Cursor Operation Conflict
rs.update
rs.close
msgbox "done"
'Windows 2003 Server Standard Edition SERVICE PACK1
'SQL SERVER 2000 SP4
'MDAC VERSION 2.8I solved the problem.. Another company shares the same sql server that
we use for our application and they had many of the settings under the
"Default Connection Options" (which is under the SQL SERVER
Settings->Connections options tab) checked off, I unchecked all of them
(which is the way it is by default when sql server is installed) and
that cleared up the problem.|||Just for the record: it seems that it was the "No count" attribute that
was causing the problem. This can be set using:
EXEC sp_configure 'user options', 512
Apparently, all server-side cursors in ADO rely on the number of
affected rows which is returned after the execution of certain
statements. Setting the "No count" attribute in "Default connection
options" (which is equivalent to executing "SET NOCOUNT ON" in each
connection that is opened) suppresses those messages, so ADO gets
confused.
For more informations, see:
http://support.microsoft.com/default.aspx?scid=KB;EN-US;195491
Razvan
Subscribe to:
Posts (Atom)