in reply to Perl connect to Microsoft SQL 2000

Thankyou very much for your replies.. I failed to mention that i am a BIT student doing my final project. I have read about the DBI module (mysql and msql). The installation of this module for my required purpose has proven difficult, as bug fixes to prevent the different error messages have left me confused. Thankyou for the advise about the ODBC module also. If possible could a Guru outline the steps required for their suggested connection technologdy (for both Server and Client) in order to achieve my long awaited for "Hello World" from the Database. Or at least tell me what to read or do. Thankyou. Daniel ps - want to show my tutor that perl can do anything

Replies are listed 'Best First'.
Re^2: Perl connect to Microsoft SQL 2000
by Ven'Tatsu (Deacon) on Jun 30, 2004 at 13:53 UTC
    What errors are you getting?
    For work I recently had to write a small perl script to connect to MSSQL2K servers with active state. To install all the modules needed to connect I use:
    c:\> ppm install DBD-ODBC
    Those are for the client only, the server shouldn't need any setup beyond a login to connect with.
    To connect I use:
    #$winauth is set from the command line to force 'Windows Authenticatio +n' my $auth = $winauth ? 'Trusted_Connection=yes' : "uid=$username;pwd=$p +assword;"; my $DSN = "driver={SQL Server};Server=$server;database=$database;$auth +"; my $dbh = DBI->connect("dbi:ODBC:$DSN") || die "Error: $DBI::errstr";