Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: updating data in Sybase

by mpeppler (Vicar)
on Jun 01, 2007 at 05:55 UTC ( #618646=note: print w/replies, xml ) Need Help??


in reply to updating data in Sybase

The error simply means that you aren't processing the results from your request(s) correctly.

The basic loop should look like this:

$dbproc->dbcmd($the_sql_cmd); # possibly add more commands to the SQL buffer with additional # dbcmd() calls # Send the command(s) to the server $dbproc->dbsqlexec; # Process all the results while($dbproc->dbresults != NO_MORE_RESULTS) { # Process any rows that might be returned: while(@data = $dbproc->dbnextrow) { ..... # do something with the data } }
What you need to realize is that for each INSERT, UPDATE, etc. in your SQL buffer you must call dbresults() at least once - hence the loop until dbresults() returns NO_MORE_RESULTS.

Michael

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://618646]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2020-11-24 06:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?