You are viewing a plain text version of this content. The canonical link for it is here.
Posted to asp@perl.apache.org by hammerblau <co...@web.de> on 2003/07/31 09:57:22 UTC

(perhaps you forgot to load "xyz")

Hello together,

ich have written a library that called _lib_database.inc

I have include this lib with :
<!--#include file=_lib_database.inc-->

It seems to be ok . But unfortunately after 10 or x times i have 
refreshed this site. I get this error :
           Can't locate object method "prepare" via package "dbcon" 
           (perhaps you forgot to load "dbcon")

In my Source i do this:
$dbs2 = dbcon->prepare("SELECT * FROM xyx WHERE ID_xy=".$ID_xyx);

Have anybody an idea how to fix this error ?

Here is the source for dbcon in the .inc File

sub dbcon
{
  my $res = DBI->connect("DBI:mysql:host=localhost;database=xyz",
                         "userxyz","passxyz",
                         {PrintError => 0, RaiseError => 1});
  return($res);
}



best regards
Matthias Ebel





---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org