Yii Framework Forum: Visual Fox Pro Db4Yiiframework - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Visual Fox Pro Db4Yiiframework VFP DB Extension to fully interact with yii framework

#1 User is offline   Vitor Oliveira 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 10-November 13
  • Location:Caldas da Rainha

  Posted 20 November 2013 - 06:12 AM

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

Usage

1. Install "advantage ODBC driver". You can search it, on Google with "Advantage ODBC download"

3. Copy the odbcvfp extension into "application.extensions" directory.

3. 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",                                         						
                        ),
    ...
),
...

Attached File(s)


0

#2 User is offline   Joan Kent 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 8
  • Joined: 04-May 15

Posted 15 July 2015 - 12:31 PM

Hi, I'm using VFP database (.dbf), I try to install this driver following your instructions, but this doesn't works, can you help me please?

My main.php file in application.config is:

'db'=>array(
			'class'=>'COdbcVfpConnection',   
			'charTrim'=>true,          
			'lowerFieldNames'=>true,   
			'driverMap'=>array('odbc'=>'COdbcVfpSchema'), 
			'connectionString' =>
			"odbc:DRIVER={Advantage StreamlineSQL ODBC};DataDirectory=\\192.168.0.16\dell-server;SERVER=NotTheServer;Compression= ;DefaultType=Visual FoxPro;Rows=False;Language=ANSI;AdvantageLocking=OFF;Locking=Record;MemoBlockSize=64;MaxTableCloseCache=5;ServerTypes=1",                                                                                         
		),




Thanks!

J.
0

#3 User is offline   CCH4YII 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 29-December 16

Posted 29 December 2016 - 12:55 PM

Hi Vitor

Were you able to connect to your vfp dbf fie ?


View PostVitor Oliveira, on 20 November 2013 - 06:12 AM, said:

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

Usage

1. Install "advantage ODBC driver". You can search it, on Google with "Advantage ODBC download"

3. Copy the odbcvfp extension into "application.extensions" directory.

3. 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",                                         						
                        ),
    ...
),
...


0

#4 User is offline   MichaelRat 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 30-January 17
  • Location:Poznan

Posted 30 January 2017 - 09:12 AM

HI,
I need to repair some DBF files created by Visual Fox Pro. I wonder if there is a free or pay tool to do it? or If this could be possible using VFP 9?

Thanks in advance.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users