Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^3: Help needed for Win32::ODBC

by terra incognita (Pilgrim)
on Oct 22, 2004 at 15:08 UTC ( [id://401510]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Help needed for Win32::ODBC
in thread Help needed for Win32::ODBC

You may want to do a DSN less connection instead of relying on a preconfigured DSN. This allows you to move and run this script to any machine with the DB Client.
use warnings; use strict; use Win32::ODBC; my $DSN = "driver={SQL Server};server=myservername;database=mydb;uid=s +a;pwd=xxxx"; if (!(my $input = new Win32::ODBC($DSN))){ print "Failure opening connection. \n\n"; exit(); }else{ print "Success (connection #", $input->Connection(), ")\n\n"; }

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (3)
As of 2024-03-29 06:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found