Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: issue in isql connection

by chrestomanci (Priest)
on Sep 08, 2011 at 14:48 UTC ( #924837=note: print w/ replies, xml ) Need Help??


in reply to issue in isql connection

I have been using Sybase recently so here goes.

Firstly, as others have said, if you can then use DBI, with DBD::Sybase. It provides a much nicer interface than attempting to parse the output from isql. However you may find (like me) that your are not allowed to install any non core modules for various reasons. (In my case the code was intended to run on a locked down server, where all code needs to pass a detailed security audit.

If you must use isql, then it wants spaces between the argument and the value. The code I used was like this:

open ISQL, '|-', "isql -D $database -U $username > $tmpFile 2>&1" or d +ie; print ISQL $passwod."\n"; print ISQL "select * from $table where $query\n"; print ISQL "go\n"; print ISQL "quit\n"; close ISQL; # Now read the output from $tmpFile


Comment on Re: issue in isql connection
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2014-08-30 21:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (294 votes), past polls