I did this with DBD::ODBC.
Here's a connection example:

======================================
use DBI;

my $dbname = 'database_name';
my $dbhost = '192.168.1.100';
my $dbuser = 'username';
my $dbpass = 'password';

my $dbh = DBI->connect("DBI:ODBC:driver=SQL 
Server;database=$dbname;Server=$dbhost;", "$dbuser","$dbpass");
# You might want to check out this option if you expect big TEXT results;
$dbhSO->{LongReadLen} = 20000;
======================================

Please note: for connecting to MSSql like this you need to setup a System 
DSN.
This worked great for me on Win32, I have no idea if it can be done from 
Linux but read the DBI FAQ for possibilities.

Regards,
Huub Peters

----- Original Message ----- 
From: Ankit Mehrotra
To: [email protected]
Sent: Tuesday, May 15, 2007 7:58 AM
Subject: Request for DBD::MS SQL



Dear All ,

I intend to remotely query Microsoft SQL Server (MS SQL) using Perl DBI 
module. The problems I am facing are :
1. The is no Driver available for MS SQL .
2. The documentation available for connecting using the Class DBI is not 
sufficient.

I am using Perl 5.8.8 from ActiveState on windows platform. I also have 
access to Linux 5.8.8 perl.
Please Help , If somebody has worked in this domain.

Thanks
Ankit
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain
confidential or privileged information. If you are
not the intended recipient, any dissemination, use,
review, distribution, printing or copying of the
information contained in this e-mail message
and/or attachments to it are strictly prohibited. If
you have received this communication in error,
please notify us by reply e-mail or telephone and
immediately and permanently delete the message
and any attachments. Thank you






_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs 


_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to