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

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.


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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://401468]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (8)
As of 2018-06-25 12:21 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (126 votes). Check out past polls.