Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
OLEDB access to DBFs across servers
Message
De
06/11/2008 17:04:02
Gil Munk
The Scarborough Group, Inc.
Baltimore, Maryland, États-Unis
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Divers
Thread ID:
01360189
Message ID:
01360344
Vues:
22
>BTW, you tried MS JET ODBC driver not VFP ODBC driver.
I have tried the VFP ODBC driver - here's the connection string:
Driver={Microsoft Visual FoxPro Driver};datasource=\\sgisqldev\data\abd
error:
Connection not opened, Error: ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed ERROR [01000] [Microsoft][ODBC Driver Manager] The driver doesn't support the version of ODBC behavior that the application requested (see SQLSetEnvAttr). ERROR [01S00] [Microsoft][ODBC Visual FoxPro Driver]datasource ERROR [01S00] [Microsoft][ODBC Visual FoxPro Driver]SourceDB

this is executed from the Sharepoint server via my browser to the Sharepoint app. The data is on the SQLServer development server.

The connection string for VFPOleDb is: Provider=vfpoledb.1;Data Source=\\sgisqldev\data\abd;Collating Sequence=general;
the Error returned is: Connection not opened, Error: Invalid path or file name.


>It looks like permission problem and I'm pretty sure it is.
I have given the Sharepoint Service account full control of the shared folder on the other server where the data is located as well as myself as user.

>Are you using linked server to access VFP tables?
Not until you mentioned it (hence the delay in my reply.) I have been using two Sharepoint platform products from Corasworks - their Suite and their Data Integration Toolset. The DIT uses Ole db providers (including vfpoldb.dll) to read/write data to/from Sharepoint apps. The vfpoledb driver works fine with dbfs located on the Sharepoint server but chokes with dbf data on any other two servers where I've tested it. After you asking about the linked server I created a series of short connection strings and querys.
This creates a specific linked server with this connection string:
Provider=SQLOLEDB;Data Source=sgisqldev;Initial Catalog=sgisam;User Id=sqluser;Password=sqluser
the query is:
exec sp_addlinkedserver @server='gmunk',@srvproduct='VFP', @provider='vfpoledb.1', @datasrc='\\sgisqldev\sgisam\sgi\data\gmac'

then I run this connection string :
Provider=SQLOLEDB;Data Source=sgisqldev;Initial Catalog=sgisam;User Id=sqluser;Password=sqluser
with the query: SELECT * from gmunk...clt

The linked server method works but the more direct vfpoledb method doesn't.

-Gil

>
>
>>I am using the latest Oledb drivers from within Sharepoint and SQL Server 2005 to read/write to DBFs. This works fine when the dbfs are on the same server but doesn't work at all when the dbfs are on a different server (in the same domain.) From within the same application I can access non-dbf tables and files on any server in the domain so I don't think it's a permissions problem and I've uninstalled the antivirus/firewall to test that but I still cannot access the dbfs across servers. I've tried using the ODBC VFP drivers as well with not luck across servers. Has any one come across this problem?
>>
>>The error is:
>>Connection not opened, Error: Invalid path or file name.
>> System.Data.OleDb.OleDbException: Invalid path or file name.
>>
>>I've tried the complete UNC path AND mapping the drive and using drive letters. Same error message. I do get a slightly different error message when using the ODBC dBase driver with this connection string: Driver={Microsoft dBase Driver (*.dbf)};datasource=\\sgisqldev\data\abd
>>The error is:
>>Connection not opened, Error: ERROR [42S02] [Microsoft][ODBC dBase Driver] The Microsoft Jet database engine could not find the object 'clt.dbf'. Make sure the object exists and that you spell its name and the path name correctly.
>>
>>Thanks,
>>
Gil Munk


"If a nation expects to be ignorant and free, it expects what never was and never will be." - Thomas Jefferson
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform