Link to home
Start Free TrialLog in
Avatar of Dabas
DabasFlag for Australia

asked on

ADO Connection string to a FoxPro 2.6 database

I am trying to use ADO to connect to a FoxPro 2.6 database, but no matter which connection string I use, I do not manage to get the code to work.
In most cases I get the famous "Could not find installable ISAM" error

I have searched both EE and MS KB, and have tried all of the following connection strings.

Any other ideas?


This is my code: (And several attempts to get to the right connection string)

    Dim rs As ADODB.Recordset, cnFox As ADODB.Connection
    Set cnFox = New ADODB.Connection
    cnFox.ConnectionString = "PROVIDER=ODBC;DSN=FoxPro Files - Word;SourceDB=\\Acctgsvr\VSNDATA\CAMSTOCK;SourceType=DBF;Exclusive=No;BackgroundFetch=No;Collate=Machine;Null=Yes;Deleted=Yes;"
    cnFox.ConnectionString = "PROVIDER=MSDASQL;driver={Microsoft FoxPro Driver (*.dbf)};uid=;pwd=;DefaultDatabase = U:\CAMSTOCK"
    cnFox.ConnectionString = "provider=Microsoft.Jet.OLEDB.3.51;Data Source=\\Acctgsvr\VSNDATA\CAMSTOCK;Extended Properties=FoxPro 2.6;"
    cnFox.ConnectionString = "Driver={Microsoft FoxPro Driver (*.dbf)};DBQ=\\Acctgsvr\VSNDATA\CAMSTOCK;uid=;pwd=;"
    cnFox.ConnectionString = "PROVIDER=MSDASQL.1;Driver={Microsoft FoxPro Driver (*.dbf)};SourceType=DBF; SOurceDb=U:\camstock"
   
    cnFox.Open

Thanks in advance!

Dabas
SOLUTION
Avatar of TimCottee
TimCottee
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Dabas

ASKER

Tim:

Tried your string, and I get this error:

[Microsoft][ODBC Driver Manager] Driver does not support this function

Any further clue?

Dabas
Avatar of Dabas

ASKER

fluglash:

Thanks for the link, but it does not seem to be FoxPro 2.6 related.
The problem currently is happening on an XP machine, and the program will have to run on Win95/98 type environments too, but I am not at that stage yet.

Dabas
Avatar of mquiroz
mquiroz

Avatar of Dabas

ASKER

mquiroz,

Thanks for the link!
Unfortunately I get the same message as I wrote in my reply to TimCottee:

[Microsoft][ODBC Driver Manager] Driver does not support this function.

Here is the code using your link:

    Dim rs As ADODB.Recordset, cnFox As ADODB.Connection
    Set cnFox = New ADODB.Connection
    cnFox.ConnectionString = "Driver={Microsoft Visual FoxPro Driver}; SourceType=DBF; SourceDB=u:\camstock; Exclusive=No;"
    cnFox.Open


Dabas
Avatar of Dabas

ASKER

And if I use:

    cnFox.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=u:\camstock;Extended Properties=FoxPro 2.6;"
as also suggested in the final remark of the link supplied by mquiroz, then the error message reads:

Could not find installable ISAM.

Any more suggestions please????????????????

Dabas

have you installed mdac_typ.exe  lately???
Avatar of Dabas

ASKER

mquiroz,
Mdac 2.7

Dabas
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
its a file called JetSp3E.exe download it and i'm sure it will fix it...
Avatar of Dabas

ASKER

mquiroz,
Downloaded and installed JetSp3E.exe
No luck.

Copied your code into a new project. Error appears on cnFox.Open
I am on an XP which has both Access97 and Access2000 installed. Using ADO 2.7 as a reference.
What else can you suggest?

Dabas
wich version of microsoft active-x data objects are you putting on references???
try 2.0 it works here...
Avatar of Dabas

ASKER

Tried with 2.0 - Your code. Same error. GRRRRRRR
please try not to use the mapped drive letter, just put the path this way:

"\\server\folder\"

let me check my apps code...
also if you're generating the dbf file from foxpro save it using "foxplus" format please...
Avatar of Dabas

ASKER

I tried your code too, just with c:\
As to the foxpro, I have no control over it. I am trying to link to files written by a third party product.
I am able to link to the foxpro tables using Access97, but some of my users have Access 2000 only. For this reason I am trying to write a program that can satisfy the best of all worlds.

Dabas
see ya man, it's very late here in america...
Avatar of Dabas

ASKER

mquiroz,

Thanks for your help. I am trying to reinstall Microsoft Jet 3.5 latest Pack to see if that gets me somewhere.
I will keep you up to date.

Dabas
did you test your connectionstring using ADO Data Control, some times it helps
Avatar of Dabas

ASKER

fluglash,

Good idea. Yes, most of the connections printed in the original question above came from experimentations done with the ADODC  control. Until now I have not been able to find a connection configuration that will test properly from the control.

Dabas
Avatar of Dabas

ASKER

Good news! I have managed to solve the problem.
Trying to fix the problem I only made it worse by trying to install different patches found at the Microsoft site. I finally found one that solved the problem:
http://download.microsoft.com/download/vfoxodbcdriver/Install/6.1/W9XNT4/EN-US/VFPODBC.msi

After installing this patch, the following connection string gets me to where I want to get. (Built using the ADODC control)

    cnFox.ConnectionString = "DSN=Visual FoxPro Tables;UID=;PWD=;SourceDB=u:\camstock;SourceType=DBF;Exclusive=No;BackgroundFetch=Yes;Collate=Machine;Null=Yes;Deleted=Yes;"

Thanking you all for your help!

Dabas
Avatar of Dabas

ASKER

Was worth waiting for the new EE program, which allows me to split the points easily and show my appreciation for the time you have put in trying to help me.

Thanks again to all involved!

Dabas
TNX!