Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Mssql DBD::Sybase

by kpaxian25 (Novice)
on Dec 01, 2005 at 21:24 UTC ( [id://513444]=perlquestion: print w/replies, xml ) Need Help??

kpaxian25 has asked for the wisdom of the Perl Monks concerning the following question:

I installed DBD::Sybase, freetds when i ran my script
use DBI; BEGIN { $ENV{'SYBASE'} = '/usr/local/freetds'; $ENV{'TDSVER'} = 7.0; } $dbh = DBI->connect("dbi:Sybase:server=10.0.0.1", "$db_username", "$db +_password") or die "\nCouldn't connect: " . $DBI::errstr;

--------------------------------------------------- error message ct_send(CS_DESCRIBE_INPUT) returned 0 at /usr/local/lib/perl5/site_perl/5.8.0/i386-freebsd/DBD/Sybase.pm line 133, <DATA> line 283. Segmentation fault (core dumped)

any help will be much appreciated. Thanks

Replies are listed 'Best First'.
Re: Mssql DBD::Sybase
by dtr (Scribe) on Dec 01, 2005 at 22:39 UTC

    Are you connecting to an actual Sybase server, or to MS-SQL? If connecting to Sybase, I don't think you can use any protocol version other than 4.0. And I think you need to use 8.0 to connect to recent MS-SQL Server boxes - particularly if you've got UTF8 data on the server end.

    So, can you try changing the TDSVER variable, and see if that fixes things?

      I am connecting to MS sql server . changed to 8.0 same error message.
Re: Mssql DBD::Sybase
by mpeppler (Vicar) on Dec 02, 2005 at 18:11 UTC
    That's not the whole script, is it?

    My guess is that your script uses placeholders, and placeholders aren't supported yet by FreeTDS. Re-write your script to interpolate the values in the $dbh->prepare() call and you should be good to go.

    Michael

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://513444]
Approved by Paladin
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2024-04-26 06:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found