Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
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
Replies are listed 'Best First'.
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 chilling in the Monastery: (5)
As of 2016-05-01 01:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    :nehw tseb si esrever ni gnitirW







    Results (441 votes). Check out past polls.