Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Declare Cursor error while implementing SCROLL CURSOR

Reply
Thread Tools

Declare Cursor error while implementing SCROLL CURSOR

 
 
invy
Guest
Posts: n/a
 
      12-28-2006
Hi,
I'm experiencing a problem while declaring scroll cursor. I'm
using Embeded SQL with C. my code is given below.

#ifdef SQLSRVR_RDBMS
EXEC SQL DECLARE CUR_DWNLD SCROLL CURSOR FOR SCURS;
EXEC SQL PREPARE SCURS FROM :S_QRY;
#endif


When i compile with nsqlprep, The error I'm getting is as below.


EXEC SQL DECLARE REGCDWNLD_CUR_CUST_DWNLD CURSOR SCROLL
SQLPREP: SQL Compile Error at line 709
OPEN REGCDWNLD_CUR_CUST_DWNLD
Error code: -19946

Cursor REGCDWNLD_CUR_CUST_DWNLD not declared
SQLPREP: SQL Compile Error at line 787
FETCH REGCDWNLD_CUR_CUST_DWNLD INTO : , : , :
, : , : ,
Error code: -19946

The code works without SCROLL option Is there any
problem with my declaration? If yes how can i correct this. I'm using
MSSQLSERVER 2000 and WINDOW 2000. Pre-compiler is NSQLPREP. Please
reply ASAP.

 
Reply With Quote
 
 
 
 
What's in a namespace
Guest
Posts: n/a
 
      12-28-2006

"invy" <(E-Mail Removed)> schreef in bericht
news:(E-Mail Removed) oups.com...
> Hi,
> I'm experiencing a problem while declaring scroll cursor. I'm
> using Embeded SQL with C. my code is given below.
>
> #ifdef SQLSRVR_RDBMS
> EXEC SQL DECLARE CUR_DWNLD SCROLL CURSOR FOR SCURS;
> EXEC SQL PREPARE SCURS FROM :S_QRY;
> #endif
>
>
> When i compile with nsqlprep, The error I'm getting is as below.
>
>
> EXEC SQL DECLARE REGCDWNLD_CUR_CUST_DWNLD CURSOR SCROLL
> SQLPREP: SQL Compile Error at line 709
> OPEN REGCDWNLD_CUR_CUST_DWNLD
> Error code: -19946
>
> Cursor REGCDWNLD_CUR_CUST_DWNLD not declared
> SQLPREP: SQL Compile Error at line 787
> FETCH REGCDWNLD_CUR_CUST_DWNLD INTO : , : , :
> , : , : ,
> Error code: -19946
>
> The code works without SCROLL option Is there any
> problem with my declaration? If yes how can i correct this. I'm using
> MSSQLSERVER 2000 and WINDOW 2000. Pre-compiler is NSQLPREP. Please
> reply ASAP.
>


Stop cross posting please. You're in the wrong group here.


 
Reply With Quote
 
 
 
 
CBFalconer
Guest
Posts: n/a
 
      12-28-2006
invy wrote:
>
> I'm experiencing a problem while declaring scroll cursor. I'm
> using Embeded SQL with C. my code is given below.
>
> #ifdef SQLSRVR_RDBMS
> EXEC SQL DECLARE CUR_DWNLD SCROLL CURSOR FOR SCURS;
> EXEC SQL PREPARE SCURS FROM :S_QRY;
> #endif


Nothing to do with the standard C language. F'ups set.

--
Chuck F (cbfalconer at maineline dot net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net>

 
Reply With Quote
 
John Bell
Guest
Posts: n/a
 
      12-28-2006
Hi

Is #ifdef SQLSRVR_RDBMS defined correctly? Error 19946 says that the cursor
is not declared.

John


"invy" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> Hi,
> I'm experiencing a problem while declaring scroll cursor. I'm
> using Embeded SQL with C. my code is given below.
>
> #ifdef SQLSRVR_RDBMS
> EXEC SQL DECLARE CUR_DWNLD SCROLL CURSOR FOR SCURS;
> EXEC SQL PREPARE SCURS FROM :S_QRY;
> #endif
>
>
> When i compile with nsqlprep, The error I'm getting is as below.
>
>
> EXEC SQL DECLARE REGCDWNLD_CUR_CUST_DWNLD CURSOR SCROLL
> SQLPREP: SQL Compile Error at line 709
> OPEN REGCDWNLD_CUR_CUST_DWNLD
> Error code: -19946
>
> Cursor REGCDWNLD_CUR_CUST_DWNLD not declared
> SQLPREP: SQL Compile Error at line 787
> FETCH REGCDWNLD_CUR_CUST_DWNLD INTO : , : , :
> , : , : ,
> Error code: -19946
>
> The code works without SCROLL option Is there any
> problem with my declaration? If yes how can i correct this. I'm using
> MSSQLSERVER 2000 and WINDOW 2000. Pre-compiler is NSQLPREP. Please
> reply ASAP.
>



 
Reply With Quote
 
CBFalconer
Guest
Posts: n/a
 
      12-28-2006
John Bell wrote:
>
> Is #ifdef SQLSRVR_RDBMS defined correctly? Error 19946 says that
> the cursor is not declared.


Please don't top-post. See the following links. And also please
do not post off-topic material to comp.lang.c. F'ups set.

--
Some informative links:
<http://www.geocities.com/nnqweb/>
<http://www.catb.org/~esr/faqs/smart-questions.html>
<http://www.caliburn.nl/topposting.html>
<http://www.netmeister.org/news/learn2quote.html>
<http://cfaj.freeshell.org/google/>


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to tell if cursor is sqlite.Cursor or psycopg2.Cursor dmaziuk Python 3 01-25-2011 04:52 AM
Declare self.cursor Dani Valverde Python 2 08-25-2010 07:54 PM
Is there a way to declare a reference as being a type implementing multiple interfaces? Oliver Wong Java 16 06-28-2006 05:22 PM
change the scroll speed of a scroll pane? Kevin Java 1 02-05-2005 09:42 AM
prevent mouse scroll to scroll in a dropdownlist nicholas ASP .Net 0 12-07-2004 11:26 AM



Advertisments