Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

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

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://924837]
and the voices are still...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2018-05-28 10:46 GMT
Find Nodes?
    Voting Booth?