Database extension to access vfp database. Easy to setup. I hope that some vfp users found this extension useful to build there own web-server tools based on Yii framework and vfp database.
Compatible with gii model and crud Generators
[size="6"]Usage[/size]
Install "advantage ODBC driver". You can search it, on Google with "Advantage ODBC download"
Copy the odbcvfp extension into "application.extensions" directory.
Attach odbcvfp components into an application and connect to your database directory. edit main.php on "application.config" directory and merge the following options
...
'import' => array(
...
'application.extensions.odbcvfp.*',
...
),
...
'components' => array(
...
'db'=>array( 'class'=>'COdbcVfpConnection',
// 'schemaCachingDuration'=>90, /* Useful to speedup schema readings */
// 'queryCachingDuration'=>90, /* Speedup static tables queries */
// 'schemaCachingExclude'=>array('listas','stock'), /* when queryCachingDuration enable you define a array with all db object (tables,views) that will be changed frequently to be excluded from cache */
'charTrim'=>true, /* this option will trim all vfp fields with char type */
'lowerFieldNames'=>true, /* this option apply strtolower to all field names. This option will be useful if you want to change database in the future. Note that most databases uses lowercase letters and advantage database uses uppercase.*/
'driverMap'=>array('odbc' =>'COdbcVfpSchema'),
'connectionString' =>
"odbc:DRIVER={Advantage StreamlineSQL ODBC};DataDirectory=<match case full path>;SERVER=NotTheServer;Compression= ;DefaultType=Visual FoxPro;Rows=False;Language=ANSI;AdvantageLocking=OFF;Locking=Record;MemoBlockSize=64;MaxTableCloseCache=5;ServerTypes=1",
),
...
),
...