|
Posted by Manuel Lemos on 08/15/05 17:56
Hello,
on 08/15/2005 11:32 AM Pablo Gosse said the following:
> Hi, folks. I've recently decided to use Manuel's Metabase instead of
> ADOdb as ADOdb doesn't support transactions for MS Access, however I'm
> getting the following error when running the sample code:
>
> Fatal error: Class metabase_manager_odbc_class: Cannot inherit from
> undefined class metabase_manager_database_class in
> C:\Inetpub\wwwroot\etrakFE\classes\metabase\metabase_odbc.php on line 13
>
> Obviously this means that the metabase_manager_odbc_class is being
> defined before metabase_manager_database_class, thus throwing an error,
> but the problem is I'm not calling this manually, and have used the
> sample code exactly as it is in the manual.
>
> Here's my code:
>
> require("classes/metabase/metabase_database.php");
> require("classes/metabase/metabase_interface.php");
>
> $error=MetabaseSetupDatabaseObject(array("Type"=>"odbc-msaccess",
> "IncludePath"=>"classes/metabase"), $db);
>
> if($error!="") {
> echo "Database setup error: $error\n";
> exit;
> }
>
> $db->SetDatabase("etrakADB");
I tried that code here with PHP 4.3.11 and it works perfectly.
Which version of PHP are you using?
Are you using any PHP cache extension like APC or another?
Metabase loads the class files by the right order but it is possible
that a buggy caching extension may be causing that problem.
You may also try loading the classes as workaround right after the
includes you make in your script:
require('classes/metabase/metabase_odbc.php');
require('classes/metabase/metabase_odbc_msaccess.php');
require('classes/metabase/manager_odbc.php');
require('classes/metabase/manager_odbc_msaccess.php');
--
Regards,
Manuel Lemos
PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/
Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html
Navigation:
[Reply to this message]
|