Hi...
Not sure if this is the right place but we have a problem registering a Visual Foxpro driver in SQL.
The driver does not appear on the initial drop down list and so we have added it manually using regsvr32. All seems fine until we try to access the server when we get error 7403 Could not locate registry entry for OLE DB provider 'VFPOLEDB'
Any ideas or advice gratefully received... Hope I have all the details, but it is happening to one of my Spanish colleagues, ad I may have missed something in translation!

Registering a Visual FoxPro driver in SQL
gprayback
Then maybe you should provide us his T-SQL code.
You can test if VFPOLEDB is really registered and working using this htm with a VFP database:
<html>
<title>Check VFP Table</title>
<body>
<script language="JScript">
function CheckTable(dbcPath,dbfName)
{
var strCn = "Provider=VFPOLEDB;Data Source=" + dbcPath;
var strSQL = "select * from " + dbfName;
var oConn = new ActiveXObject("Adodb.Connection");
oConn.ConnectionString = strCn;
oConn.Open;
var oRS = oConn.Execute(strSQL);
var lst="<TABLE border='1'><TR>";
var Maxfields=5;
var MaxRows=20;
for (i=0;i<Math.min(oRS.Fields.Count,Maxfields);i++)
{
lst += "<TH>";
lst += oRS.Fields(i).Name;
lst += "</TH>";
}
lst += "</TR>";
var counter=0;
while (!oRS.eof && counter < MaxRows)
{
lst += "<TR>";
for (i=0;i<Math.min(oRS.Fields.Count,Maxfields);i++)
{
lst += "<TD>";
lst += oRS.Fields(i).Value;
lst += "</TD>";
}
lst += "</TR>";
oRS.MoveNext();
counter++;
}
lst += "</TABLE>";
oConn.Close();
tablelist.innerHTML = lst;
return true;
}
</script>
<table>
<TR><TD>Locate DBC</TD><TD><input type='file' size='80' name='DBCLOCATION'></TD></TR>
<TR><TD>TableName</TD><TD><input type='text' size='80' name='TABLENAME'></TD></TR>
</TABLE><HR>
<input type='button' value='List' onClick="CheckTable(DBCLOCATION.value,TABLENAME.value);return;">
<div id='tablelist'></div>
</body>
</html>
Roland Kamsika
It is found here:
http://www.microsoft.com/downloads/details.aspx FamilyId=E1A87D8F-2D58-491F-A0FA-95A3289C5FD4&displaylang=en
HuskyNET
Thanks for your patience on this. Was unable to test the html on the linked server till today as it was unavaliable on Wednesday and we were closed for Easter on Thursday and Friday.
The html code returns nothing when we link to the Visual Foxpro. We press "List" and nothing is shown.
As for the SQL - I could post the code but I think the problem is with the connection as it fails on a simple " SELECT * FROM ARTICULOS"
Thanks again for your patience and help.
msx86
It is failing with a simple SELECT using the Query Analyzer.
Reading back I notice I have missed out that it is a linked server. I do not know if that makes any difference.
nevilledubash
What does the HTM do If you insist not to show the code that's all I can say. Linked servers work very well for me.
papablopo
Bo Jangeborg
Think we have some progress...
Have now connected to the Visual.Foxpro database and can interrogate the data on a local machine. However it is still failing on the Linked server.
Code is ( Sorry about the earlier code.. a lazy posting...)
SELECT articulo.codigo, articulo.nombre FROM prueba1.gestion..articulo articulo
where familia='TONER'
The error returned is
Servidor: mensaje 7303, nivel 16, estado 2, linea 1
No se puede inicializar el objeto origen de datos del proveedor OLE DB 'VFPOLEDB'.
[OLE/DB provider returned message: Invalid path or file name.]
Traza de error de OLE DB [OLE/DB Provider 'VFPOLEDB' IDBInitialize::Initialize returned 0x80040e21].
Basic translation...
Server message 7303 level 16 state 2 line 1
Cannot initialise data source object of OLE DB providor 'VFPOLEDB'
The whole area of Visual FoxPro and Linked servers is new to me so I apologise if it is something obvious.....
ocmega
Assuming you used HTML right, it indicates VFPOLEDB is not correctly installed (then it should indicate that there is an error with an exclamation mark icon in bottom left, clicking it would display the error such as "provider not found")
Another way to test:
-Create a new text file on desktop
-Rename it with a udl extension, say test.udl.
-Double click the file.
-Click 'Provider' tab and check if MS OleDb provider for VFP is listed or not.
PS: I expected to see a different SQL like:
SELECT * FROM linkedServer...ARTICULOS
PWN-E
Thanks for that.
Unfortunately we have already downloaded the package and run the executable. All seemed to run OK.
The problem occurs when we try to interrogate the FoxPro database from SQL queries.
Any other ideas gratefully received!!!
John Stolwerk
"OLE/DB provider returned message: Invalid path or file name."
I see this message along the lines. Might it be that the server don't have read/write access to remote server's path where VFP tables are In other words it looks like you have a security problem.