Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Help needed for Win32::ODBC

by olivierp (Hermit)
on Oct 22, 2004 at 13:22 UTC ( #401468=note: print w/ replies, xml ) Need Help??


in reply to Help needed for Win32::ODBC

$DSN is incorrect.
Try with my $DSN = "DSN=IBUeMBA_DSN;UID=sa;PWD=xxxx;";
This outside link can also help you out when dealing with "DSN"s in general.


--
Olivier


Comment on Re: Help needed for Win32::ODBC
Download Code
Re^2: Help needed for Win32::ODBC
by YAFZ (Pilgrim) on Oct 22, 2004 at 13:55 UTC
    Oh my! I simply missed that, thanks a lot for figuring out :)
      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
Node Status?
node history
Node Type: note [id://401468]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (8)
As of 2015-07-04 17:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (60 votes), past polls