Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
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

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 contemplating the Monastery: (4)
As of 2016-07-29 09:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What is your favorite alternate name for a (specific) keyboard key?


















    Results (260 votes). Check out past polls.