Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP Connecting to a .DBF Table w/ associated .FPT Issue

Status
Not open for further replies.

justinpl

Programmer
Nov 20, 2003
19
US
I am using ASP to connect to a .DBF Table. The .DBF file is created by either FOX PRO, ADVANTAGE DATABASE SERVER, OR CLIPPER. The .DBF Table can be opened in ASP by using the following code:

---------------------------------------------------

cDataBasePath ="Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & Server.MapPath("\db_directory\safe") & ";" & _
"Extended Properties=""DBASE IV;"";"

Set Con = Server.CreateObject("ADODB.Connection")
Con.Open cDataBasePath

SQLString = "SELECT DISTINCT TAG_ID FROM DATA.DBF"
Set RS = Con.Execute(SQLString)

--------------------------------------------------

Most of the .DBF files will allow this process and return my various queries. The problem is when the .DBF has a field that the data type is set to MEMO. When a MEMO field is present the .DBF file links to a .FPT file to get the value for the MEMO field. So basically every time I try to run the above SQLString if there is a field type of MEMO, the page will produce an error message that says, "EXTERNAL TABLE IS NOT IN THE EXPECTED FORMAT".

I would like to know if there is a way to access these files with or without referrencing the .FPT file? Please help....

Thanks
 
I think that you need the Visual Foxpro OLE DB driver from MSFT site for tables with .FPT memo.
 
thanks for the reply. i did start using the foxpro drivers and that seems to work. now i am getting a database sharing violation. the .asp work great all the time, but the internal clipper program is getting the error.
 
Check connection settings for VFP driver. Needs to have "Exclusive=OFF"

Also oportunistic locking on server can lead to strange behaviour (including corruption) related to shared file access.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top