It is currently Wed, 01 Oct 2014 05:13:16 GMT



 
Author Message
 sybperl err msg: "Attempt to initiate a new SQL Server operation with results pending."
Hi there,

I am using sybperl.pl to access Sybase from a perl program. I got the
following error message,

"
Sybase error: Attempt to initiate a new SQL Server operation with results
pending.
"

I tested the SQL statements in $Query that I sent out in &dbcmd($Query), the
SQL statements are fine. The same program is able to access and delete data
from db before freaking out. I have no clue why the last operation is so
upseting.

The SQL statement goes like,

begin tran
insert into table1 values (...)
insert into table1 values (...)
update table3 set .....
insert into table4 values (...)
commit tran
go

Can anybody enlighten me?

/Elaine

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.**-**.com/ ;     Search, Read, Discuss, or Start Your Own    



 Sat, 04 Aug 2001 03:00:00 GMT   
 sybperl err msg: "Attempt to initiate a new SQL Server operation with results pending."

You need to call dbresults() in a loop, until it returns NO_MORE_RESULTS
(or $NO_MORE_RESULTS, if you're using the old perl4 syntax).

Something like this:

&dbcmd($Query);
&dbsqlexec();
while(&dbresults() != $NO_MORE_RESULTS) {

Your query doesn't return any rows, but if you want to be ultra safe, you
can call dbnextrow() each time through the dbresults() loop, just to make sure...

Michael
--
Michael Peppler         -||-  Data Migrations Inc.
mpepp...@mbay.net       -||-  http://www.mbay.net/~mpeppler
Int. Sybase User Group  -||-  http://www.isug.com
Sybase on Linux mailing list: ase-linux-l...@isug.com



 Sat, 04 Aug 2001 03:00:00 GMT   
 
   [ 2 post ] 

Similar Threads

1. Err msg: "Sensed a Recovered Error"

2. SYBPERL binaries wanted for creating a WWW-SQL gateway with the WBD tool

3. A new meaning to "Illegal Operation"

4. Err msg in useing pppd

5. err msg: boot patrition is too big?

6. Kernel 1.99 err msg: cannot execute binary

7. IP tunneling: SIOCSIFADDR err msg

8. CDE and err msg quesion...


 
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software