in reply to Re: Can't call method "prepare" on an undefined value
in thread Can't call method "prepare" on an undefined value
Here's my connect and disconnect procedures.. the %MWSPARAM hash gets populated with the necessary database information.
sub mwsconnect { use DBI; local $server = $MWSPARAM{server}; local $db = $MWSPARAM{db}; local $user = $MWSPARAM{user}; local $passwd = $MWSPARAM{passwd}; #========================================== #make the connection #========================================== $mwsdbh = DBI->connect("DBI:mysqlPP:database=$db;host=$server" +, $user, $passwd) or &mwserror("DB Error: " . $DBI::errstr); } sub mwsdisconnect { $mwsdbh->disconnect(); }
...
Thanks!
#!/massyn.pl The more I learn, the more I realize I don't know. Albert Einstein 1879-1955
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Can't call method "prepare" on an undefined value
by Massyn (Hermit) on Dec 19, 2002 at 06:12 UTC | |
by runrig (Abbot) on Dec 19, 2002 at 18:36 UTC | |
by Anonymous Monk on May 02, 2005 at 01:05 UTC |