Wednesday, March 7, 2012

server to Visual FoxPro Not Work

I've downloaded and installed the latest VFPOLEDB (12/04) on 2 separate SQL Server boxes.

In both cases, If I connect to SQL Server with Query Analyzer as (local) while on a box, the linked server to my foxpro database works fine with openquery().

However, If I'm at one box and attached to SQL Server on the other box, the openquery() fails.

Here's some particulars:
--
EXEC sp_addlinkedserver
@.server='VFP',
@.provider='VFPOLEDB',
@.datasrc='\\hdmcpdctis1\tisrnddata\',
@.srvproduct='Visual FoxPro'

--this works on either (local) box
SELECT *
FROM OPENQUERY(VFP, 'select * from tislists')
Go

--but, the same openquery() above doesn't work if the box I'm running it from is attached to the SQL Server on the other box. I get:

Server: Msg 7302, Level 16, State 1, Line 1
Could not create an instance of OLE DB provider 'VFPOLEDB'.
OLE DB error trace [Non-interface error: CoCreate of DSO for VFPOLEDB returned 0x80040154].
=====================
One other approach I tried that works while on the (local) box, but fails when attached to the SQL Server on the other box:

select * from openrowset('MSDASQL',
'Driver=Microsoft Visual FoxPro Driver;SourceType=DBF;SourceDB= \\hdmcpdctis1\tisrnddata\ ',
'select * from [tislists.DBF]')


With error:
Server: Msg 7399, Level 16, State 1, Line 1
OLE DB provider 'MSDASQL' reported an error.
[OLE/DB provider returned message: [Microsoft][ODBC Driver Manager] Driver does not support this function]
OLE DB error trace [OLE/DB Provider 'MSDASQL' IDBInitialize::Initialize returned 0x80004005: ].
===========================

Any Help is greatly appreciated! Thanks,

peter :confused:Hi,

Do you still have this problem? If not, how did you get around it? I am experiencing the exact same thing and am quite confused at this point...

Thanks!|||At my last job I handled a few linked Visual FoxPro linked serves from a SQL 7 database and I did'nt encounter this but let me ask you 2 questions.

1. Are you able query any database in BOX B from BOX A?

2. Have you tried querying using the 4 part name? linked_server_name.catalog.schema.object_name|||Answers to the questions:

1) Yes I can query some DB's from BOX A while on BOX B, the success depends on what authentication type the SQL Server instance is registered with in my enterprise manager

2) I have not tried querying with the 4 part name, I have only gotten as far as trying to view the list of tables through enterprise manager when I get the error

Thanks|||Can you see the tables is enterprise manager on the local box?

If not you have problem with your linked server definition. I am leaving for the day but I can check back on this this evening if I am not totally dead to the world.|||I can see the tables in EM on the local box, just not from the remote box.

Good luck on the interview...

No comments:

Post a Comment