Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: updating data in Sybase

by mpeppler (Vicar)
on Jun 01, 2007 at 05:55 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://618646]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2024-03-28 12:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found