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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to