Gossamer Forum
Home : General : Databases and SQL :

mSQL and Perl

Quote Reply
mSQL and Perl
Could anyone please tell me how to connect a MS-SQL-Server with Perl, especially how I can install/configure/... something like "mSQL.pm" under Win2000 or XP. I tried to copy the file into the required directory but it didn't work. And I couldn't use the linux makefiles to install ODBC::msql or just mssql.pm, because I don't know how to change them to a working Windows Makefile.

The Active State PPM showed a list of msql packages, but none of them could be found when I tried to install it. (I'm using PPM3).

Please send a link to a working install-file or just a short (exact) description how to connect to a MS-SQL-Server in another way.

Thanks a lot

Susi Schmidt
Quote Reply
Re: [SusiS] mSQL and Perl In reply to
Please don't post duplicates. It only clogs up the forum, and people learn to ignore threads completly if they see a duplicate Wink

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] mSQL and Perl In reply to
Thanks Andy,

I just didn't know how to categorize my problem. Angelic

Would you do me a favor and suggest at least something?

HOW CAN I CONNECT A MS-SQL DATABASE WITH PERL?

WHAT DO I NEED FOR THIS CONNECTION?



Thanks

Susi
Quote Reply
Re: [SusiS] mSQL and Perl In reply to
Quote:
HOW CAN I CONNECT A MS-SQL DATABASE WITH PERL?

Run these from the command prompt:

ppm install DBI
ppm install DBD::mSQL

Then read here:

http://search.cpan.org/...mSQL/lib/DBD/mSQL.pm
Quote Reply
Re: [Paul] mSQL and Perl In reply to
Step 1 was no problem, but "ppm install DBD::mSQL" caused the following error.

Searching for 'DBD::mSQL' returned no results. Try a broader search first.

It seems the I've done something wrong - again! Is there an easy solution for this problem? Could you please help once again?

Susi
Quote Reply
Re: [Paul] mSQL and Perl In reply to
Hi,

problem solved with

use DBI;

my $DSN = 'driver={SQL Server};Server=server_name;database=database_name;uid=user;pwd=password;';
my $dbh = DBI->connect("dbi:ODBC:$DSN") or die "$DBI::errstr\n";

cu

Susi