Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^6: Perl CGI and SQL statements

by osunderdog (Deacon)
on Apr 19, 2006 at 11:56 UTC ( #544330=note: print w/replies, xml ) Need Help??


in reply to Re^5: Perl CGI and SQL statements
in thread Perl CGI and SQL statements

my $db = new Win32::ODBC('$DSN');

The declaration of $db is too low. The variable is being declared in an if check and it's being referenced in an outer scope. Declare $db higher up in a block where it's visible to both the case where you assign it and where you reference it. The outer scope would work, that's where you've defined the $cgi variable.

Hazah! I'm Employed!

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2020-11-29 19:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?