If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ANSI SQL > returning numeric values via sql!

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-29-03, 03:05
shuchi shuchi is offline
Registered User
 
Join Date: Jan 2003
Posts: 55
Question returning numeric values via sql!

hi once again..
problems problems!
sigh yet another one,,,so here goes

I am using perl script to manipulate by sybase databse. the connection etc is allmade thru the code and it reads an input sql file to execute the queries. Now my question is that is there any way to check whether the query exectuion failed apart from printing out the error messages? as in any number/value returned anywhere?
I know @@error has the eror num of the error tht occured but after contro is ranferred bak to my perl script how do i check ths value? is there a way to return ths value to my script?
if i do something like

$now=open(ISQL, "isql -S $server1 -U $user1 -P $passwd1 -w250 -i $sqlfile|") || die "Can't run isql: $!";

and check the value of $now it always has a positive value since the connection was successful...doesnt give me the value of the error if any occured..!
help me if anyone has any clues. My sql file can contain multiple queries but as long as even one fo them fails i need some sorta value to ne returned to my script so that i can either exit from my code or print an error value.

thnx fr any help in advance

cheers!
-shuchi
__________________
You try and try again..but then give up, there's no sense in being a complete fool about it!!!
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On