I've connected the ODBC successfully using following configure:

    var $AAAitemDB = array('driver' => 'odbc',
                                        'connect' => 'odbc_connect',
                                        'database' => 'AAAItemDB');

The AAAItemDB is the name which I set in ODBC in windows server 2000.
In this ODBC source I have more than 30 dbf (VFP 6.0) files. The model
is defined as following:

class AAAItem extends AppModel
{
    var $name = 'AAAItem';
    var $useDbConfig  = AAAitemDB';
    var $useTable = 'item';
}

For some reasons I use different name as the Model name and the table
name is "item" which the target dbf is 'item.dbf'. However, I always
got the error message:

Missing Database Table
No Database table for model Tectradeitem (expected "item"), create it
first.

If I use the normal method to connect this ODBC database as following,
I have no error and can get all the data I need:

        $connectionstring = odbc_connect('AAAItemDB', '', '');
        $query = 'SELECT * FROM `item`';
        $itemresult = odbc_exec($connectionstring, $query);


I have no idea how to solve it. Any help?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---

Reply via email to