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

Direct Connection to MSSQL

by PugSA (Beadle)
on Dec 04, 2009 at 08:17 UTC ( [id://811041]=perlquestion: print w/replies, xml ) Need Help??

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

Hi Monks

I'm trying to create a direct connection to a MSSQL database I currently use ODBC but I want to automatically generate databases and dont want to manually add the ODBC connection

I've installed the DBD::Sybase module (I'm using perl for windows). When I run the following code I get and error unable to locate component libct.dll

I've googled for the dll but cant find anyware to download these there is some thing about installing sybase but I dont want to do that because I just want to connect to mssql

#!/usr/local/bin/perl # use DBI; my $dbh = DBI->connect("dbi:Sybase:server=sql01", 'piet', 'pompies', { +PrintError => 0}); die "Unable for connect to server $DBI::errstr" unless $dbh;

Please help because there is clearly somthing I dont understand about this

Replies are listed 'Best First'.
Re: Direct Connection to MSSQL
by Jenda (Abbot) on Dec 04, 2009 at 14:33 UTC

    You do not need a DSN to connect via ODBC. See DBD::ODBC::FAQ.

    Jenda
    Enoch was right!
    Enjoy the last years of Rome.

      Jenda thank you very much when I first created the connection to a MSSQL server was a few years ago and I have not changed the connection since then.

      This version was not released then and I've never thought to go and check that they added a connection without DSN.

      Thank you everyone for taking time to reply to my request. By the time you replied I was already on weekend and thats why I'm only replying on it now Have a wonderful day

Re: Direct Connection to MSSQL
by derby (Abbot) on Dec 04, 2009 at 13:59 UTC

    Sound like a bad install of DBD::Sybase. libct.dll is the sybase library that DBD::Sybase wraps. Do you have the Sybase client libs installed?

    -derby
Re: Direct Connection to MSSQL
by mpeppler (Vicar) on Dec 07, 2009 at 05:54 UTC
    As derby says - you need the client API libraries for DBD::Sybase to work. However, the Sybase version of those libs will NOT work with MS-SQL. Instead you need to install FreeTDS (www.freetds.org).

    Michael

Re: Direct Connection to MSSQL
by misterwhipple (Monk) on Dec 04, 2009 at 14:33 UTC
    I'm trying to create a direct connection to a MSSQL database I currently use ODBC but I want to automatically generate databases and dont want to manually add the ODBC connection

    I'm not familiar with the issue you refer to. Would you please elaborate? You might be able to save me some trouble with a webapp I'm working on.

    --
    Any sufficiently interesting Perl project will depend upon at least one module that doesn't run on Windows.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2024-04-26 03:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found