473,387 Members | 1,619 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Could not complete cursor operation because the table schema changed after the cursor was declared

Hi,

My stored procedure was working fine but when i made added 2 fields to my
table and then made subsequent changes to my sp it give me the following
error:

"Could not complete cursor operation because the table schema changed after
the cursor was declared"

it works fine from back end (query analyser) but when i execute from my dot
net code it give the above error.

does anyone help please ?
Jul 21 '05 #1
2 3303
Are you using ADO.NET or ADO v 2.x? Can you post the code you're using?

--
W.G. Ryan, MVP

www.tibasolutions.com | www.devbuzz.com | www.knowdotnet.com
"Ajit" <ad******@thedebtmediator.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Hi,

My stored procedure was working fine but when i made added 2 fields to my
table and then made subsequent changes to my sp it give me the following
error:

"Could not complete cursor operation because the table schema changed after the cursor was declared"

it works fine from back end (query analyser) but when i execute from my dot net code it give the above error.

does anyone help please ?

Jul 21 '05 #2
Dim oCmd As SqlCommand
oCmd = New SqlCommand("sp_processWeeklytask", oConn)
oCmd.CommandType = CommandType.StoredProcedure
oCmd.CommandTimeout = 0
oCmd.ExecuteNonQuery()

I am using ADO.Net

"W.G. Ryan eMVP" <Wi*********@gmail.com> wrote in message
news:uQ**************@TK2MSFTNGP15.phx.gbl...
Are you using ADO.NET or ADO v 2.x? Can you post the code you're using?

--
W.G. Ryan, MVP

www.tibasolutions.com | www.devbuzz.com | www.knowdotnet.com
"Ajit" <ad******@thedebtmediator.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Hi,

My stored procedure was working fine but when i made added 2 fields to my table and then made subsequent changes to my sp it give me the following
error:

"Could not complete cursor operation because the table schema changed

after
the cursor was declared"

it works fine from back end (query analyser) but when i execute from my

dot
net code it give the above error.

does anyone help please ?


Jul 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: teddysnips | last post by:
SQL Server 2000 I have a stored procedure that uses an extended SPROC to send an email notification to my customers when a document is distributed. However, the SPROC has an unexpected side...
4
by: Alfetta159 | last post by:
I've been setting up a schema with the XML Designer in VS .NET 2003. The designer lets me set up a lot of things including a complex type that contains an unnamed complex type called modified. ...
4
by: Oliver Stratmann | last post by:
Hello All! We have a cursor in an application which fetches some data out of a DB2-DB. Normally it all works kind of well. We inserted a routine at certain places in order to do some...
2
by: Ajit | last post by:
Hi, My stored procedure was working fine but when i made added 2 fields to my table and then made subsequent changes to my sp it give me the following error: "Could not complete cursor...
6
by: jenipriya | last post by:
Hi all... its very urgent.. please........i m a beginner in oracle.... Anyone please help me wit dese codes i hv tried... and correct the errors... The table structures i hav Employee (EmpID,...
1
by: Ergates | last post by:
I'm sure I'm just being thick, but I just can't get the following to work. I have loaded an XSD file into an Oracle xmltype table (called xsd_table here). The xsd looks roughly like this: ...
1
by: Ultrak The DBA | last post by:
UDB Version 8.2 FP7 (r"DB2 v8.1.1.128", "s061108", "U810098", and FixPak "14".) 64 bit running on AIX 5.3. We were getting the SQL0668 error below so we put the status sql into the script to...
0
debasisdas
by: debasisdas | last post by:
This thread contains some useful tips/samples regarding some advance concepts in cursors. FEW MORE EXAMPLES =================== declare er emp%rowtype; cursor c1 is select * from emp; begin...
36
by: CK | last post by:
How do I write a set based query? I have a groupSets table with fields setId, idField, datasource, nameField, prefix, active Data: 1,someIDfield, someTable, someField, pre1, 1 2,someotherIDfield,...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.