Yuo need to use the DBI
module and use the ODBC DBD driver.
Here is a sample code to
connect:
# this is a test script to try to connect to a Microsoft SQL
server
use strict;
use warnings;
use warnings;
use DBI; #Load the DBI module
our $dbh1 = DBI->connect('dbi:ODBC:yourodbcnamegoeshere',
'username', 'password) || die
"Can't connect to servername\n";
print "Connected successfully to servername!\n";
"Can't connect to servername\n";
print "Connected successfully to servername!\n";
$dbh1->disconnect
or warn "Disconnection failed: $DBI::errstr\n";
exit;
Note that in the XP
environment you must have the ODBC set up properly under control
panel/administrative tools
Good luck!
Ken Barker
IT Lead
Tel: 314-213-7927
1100 Corporate Square
St. Louis, MO 63132
[EMAIL PROTECTED]
From: [EMAIL PROTECTED] on behalf of ukhas jean
Sent: Wed 6/14/2006 8:51 AM
To: [email protected]
Subject: Sql Server 2000 and Perl connectivity. Is it possible??
Hello All,
I wanted to connect to a MSSQL Server 2000 Database and was wondering if
any of you guys can help me with this. I am having Perl 5.6 and am working on
Win XP.
Also, I do have some machines in my workplace that are runnin on
Linux.
Any leads/ advises/ suggestions/ solutions would be very much
appreciated.
I am really stuck and am unable to find any proper solution even after
doing a search with google.
If any of u gurus can help me with even the name of the module that I can
use for this ... i would really appreciate it.
Hoping you will kindly oblige.
Thanks and Regards,
Ukhas Jean
__________________________________________________
Do You Yahoo!?
Tired
of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
______________________________________________________________________
This
e-mail has been scanned by MCI Managed Email Content Service, using Skeptic(tm)
technology powered by MessageLabs. For more information on MCI's Managed Email
Content Service, visit
http://www.mci.com.
______________________________________________________________________
_______________________________________________ ActivePerl mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
