Home > database >  VFP how to connect to a local database
VFP how to connect to a local database

Time:09-20

VFP small white, consult everybody, at ordinary times on the command line the oracle database operation, now has a task is to export some of the oracle database table for DBF format, it's around BuKa VFP, I don't know how to use VFP to connect local oracle database table data export for DBF format, no contact with VFP, I am not used.. Trouble you give me some advice, thank you very much

CodePudding user response:

Suggestions in the oracle database export, if you can't choose DBF format directly, also can use TXT transit

CodePudding user response:

Since has been derived for DBF files, that install a VFP, operating it in VFP, no longer need to connect the oracle?
If you really need to connect, usually the connection statement is as follows:
* * to connect to the database first
Nhandle=SQLSTRINGCONNECT (" Driver={Microsoft odbc for oracle}; Server=oraclesever. World; Uid=admin; The PWD=pass;" )
IF nhandle & gt; 0 & amp; & If the connection is successful, usable select command to read data to the temporary table need mydbf
Ac=SQLEXEC (nhandle, "the select field 1, field 2,... The from mytab where... ", "mydbf")
IF the Ac & gt;=0
The SELECT mydbf
& & Here can be related operations on the table, including the BROWSE, export, etc.
ENDIF
=SQLDISCONNECT (nhandle) & amp; & Disconnect the database
ENDIF
  •  Tags:  
  • VFP
  • Related