Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: ODBC and MS SQL Server 2000 Connection

by peacemaker1820 (Pilgrim)
on Jun 28, 2002 at 21:10 UTC ( #178145=note: print w/replies, xml ) Need Help??


in reply to ODBC and MS SQL Server 2000 Connection

print "HTTP/1.0 200 OK\n";
print "Content-Type: text/html\n\n";
print "<HTML><HEAD><TITLE></TITLE></HEAD>\n";
print "<BODY>\n";

use DBI;
#use DBD::ODBC;
use CGI;

my ( $data_source, $database, $user_id, $password ) = qw( sdp-si.biz SDPSI username password   );
my $DSN = "driver={SQL Server};Server=$data_source;Database=$database;UID=$user_id;PWD=$password";
#Connect the database handle.
$dbh = DBI->connect("DBI:ODBC:$DSN") or die "$DBI::errstr\n";

print "hello there";
#Close connection when finished:
$dbh->disconnect;
print "hello there";
print "</BODY>\n";
print "</HTML>\n";
  • Comment on Re: ODBC and MS SQL Server 2000 Connection

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://178145]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2020-12-03 02:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How often do you use taint mode?





    Results (49 votes). Check out past polls.

    Notices?