Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Re: WIn32::ODBC - Can't call method "SqL" on an undefined value on XP machine

by jimbojones (Friar)
on Apr 06, 2005 at 21:38 UTC ( #445453=note: print w/replies, xml ) Need Help??

in reply to WIn32::ODBC - Can't call method "SqL" on an undefined value on XP machine


I suspect that you aren't connecting to the dsn correctly from your XP box. Hence, after the first line, the object $db is undefined. Something like:

my $db = new Win32::ODBC("dsn=A3T;UID=shenriks;PWD=changeme0"); die "Cannot connect to dsn A3T" unless ( defined $db );
or something like that. From the Win32::ODBC doc

Next, create a data connection to your DSN:

$Data = new Win32::ODBC("MyDSN");
NOTE: MyDSN can be either the DSN as defined in the ODBC Administrator, or it can be an honest-to-God DSN Connect String.

Example: "DSN=My Database;UID=Brown Cow;PWD=Moo;"

You should check to see if $Data is indeed defined, otherwise there has been an error.
(emphasis added).

Also, look into code tags for your posts. See this node 17558 for more details.

Updated: added link to writeup formatting node

- j

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://445453]
[Corion]: choroba: Yeah, that's why I like that approach; it seems even quite obvious in retrospect to me, but many things are in hindsight ;)

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (10)
As of 2016-12-06 15:42 GMT
Find Nodes?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:

    Results (109 votes). Check out past polls.