Home > Archive > PERL Modules > May 2004 > Using DBI Module
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| Satish 2004-05-12, 7:21 pm |
| Hi all,
I would like to know how to call sybase stored procedures from perl.
Also given DSQUERY and DSDATABASE, how will the connection string be?
Thanks,
Satish
| |
| Michael Peppler 2004-05-13, 2:30 am |
| On Wed, 12 May 2004 14:00:18 -0700, Satish wrote:
> Hi all,
>
> I would like to know how to call sybase stored procedures from perl. Also
> given DSQUERY and DSDATABASE, how will the connection string be?
You can call a Sybase stored proc just like any other SQL statement. See
perldoc DBD::Sybase for at least one example.
The connection string is also defined in the DBD::Sybase docs, but
essentially it is:
$dbh = DBI->connect('dbi:Sybase:server=<name>;database=<name>', 'user',
'pwd');
If the "server" is omitted, then the value of DSQUERY is used if it
exists, otherwise "SYBASE" is used. If the "database" is omitted the
default database of the user you are connecting as will be used, and
DSDATABASE is not used at all.
Note that the Sybase-specific connection parameters are separated by ;
(semi-colon).
Michael
--
Michael Peppler Data Migrations, Inc.
mpeppler@peppler.org http://www.peppler.org/
Sybase T-SQL/OpenClient/OpenServer/C/Perl developer available for short or
long term contract positions - http://www.peppler.org/resume.html
|
|
|
|
|