Home » Database » DB » Bug #2142
DB_dbase does not implement tableInfo()
Details
| Request #2142 | DB_dbase does not implement tableInfo() |
|---|---|
| Submitted | 2004-08-17 00:41 UTC |
| From | ylf at xung dot org |
| Assigned | danielc |
| Status | Closed |
| Package | DB |
| PHP Version | 4.3.4 |
| Roadmaps | (Not assigned) |
Comments
[2004-08-17 00:41 UTC] ylf at xung dot org
Description:
------------
Hi,
From the pear-general mailing list :
<snippet>
> I'm working with PEAR:DB and dbf(dbase) files. It works fine but I
> want to work with PEAR:DB:DataObject and when I call
> generateTables.php to autobuild the class files I get this error:
>
> DB Error: DB backend not capable.
>
> Anyone know if is possible do this?
The DataObject generator relies on calls to DB::tableInfo() to retrieve
informations about the table columns (type, is_it_an_index?, etc...).
It uses these informations to build the schema and the class files.
DB_dbase.php does not implement this tableInfo() function. This is
why you get this error.
I'm no dbase expert but the dbf file format seem to contain informations
about the column types, as I can see in the following spec:
http://burks.brighton.ac.uk/burks/language/pascal/uddf/pages/dbase.htm
Given this, your problem seem to come from a limitation in DB_dbase.php.
You may want to report a bug at : http://pear.php.net/bugs
</snippet>
The user did not follow up. This looks like a bug to me so I forward it in here.
Additionally, I see this PHP5-only new function : dbase_get_header_info()
--
og
[2004-08-17 00:48 UTC] ylf at xung dot org
There's a user comment (The first one, by Hadi Rusiah) on the php dbase manual page, stating : "If you are using PHP < 5, you can use this function to retrieve dbf header [...]"
Here it is :
http://www.php.net/manual/en/ref.dbase.php
--
og
[2004-08-22 01:54 UTC] ylf at xung dot org
Actually, that's not me...
This comes from the pear-general mailing-list. I'm the one who answered to that guy, who had problems with DataObjects on dbase.
Here's the original thread :
http://marc.theaimsgroup.com/?t=109239310800008&r=1&w=2
By the way, please consider this issue break DataObject support on dbase. I think it sounds more like a bug than a feature request...