Showing posts with label foxpro. Show all posts
Showing posts with label foxpro. Show all posts

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...

server to Visual Foxpro .dbc database on network from sql server

Hi all,
I have Visual Foxpro 6.0 tables on network server inside a foxpro
database container .dbc. I have SQL server 7.0 on another server on the
network. I want to import the dbf files of foxpro into SQL server.
Can anybody suggest a way to do it. I created a linked server by giving the
path but I get the ODBC driver error as it cannot open the .dbc file.
Any suggestions?
Message posted via http://www.sqlmonster.com
Try DTS - you should be able to import the data that way assuming you have
the proper data driver for Foxpro
I have a visual foxpro driver in my list, but I'm not sure what version it
is.
"rameshwar elka via SQLMonster.com" <forum@.SQLMonster.com> wrote in message
news:a37fe497729140acbd10a8e569c94622@.SQLMonster.c om...
> Hi all,
> I have Visual Foxpro 6.0 tables on network server inside a foxpro
> database container .dbc. I have SQL server 7.0 on another server on the
> network. I want to import the dbf files of foxpro into SQL server.
> Can anybody suggest a way to do it. I created a linked server by giving
the
> path but I get the ODBC driver error as it cannot open the .dbc file.
> Any suggestions?
> --
> Message posted via http://www.sqlmonster.com

server to Visual Foxpro .dbc database on network from sql server

Hi all,
I have Visual Foxpro 6.0 tables on network server inside a foxpro
database container .dbc. I have SQL server 7.0 on another server on the
network. I want to import the dbf files of foxpro into SQL server.
Can anybody suggest a way to do it. I created a linked server by giving the
path but I get the ODBC driver error as it cannot open the .dbc file.
Any suggestions?
--
Message posted via http://www.sqlmonster.comTry DTS - you should be able to import the data that way assuming you have
the proper data driver for Foxpro
I have a visual foxpro driver in my list, but I'm not sure what version it
is.
"rameshwar elka via SQLMonster.com" <forum@.SQLMonster.com> wrote in message
news:a37fe497729140acbd10a8e569c94622@.SQLMonster.com...
> Hi all,
> I have Visual Foxpro 6.0 tables on network server inside a foxpro
> database container .dbc. I have SQL server 7.0 on another server on the
> network. I want to import the dbf files of foxpro into SQL server.
> Can anybody suggest a way to do it. I created a linked server by giving
the
> path but I get the ODBC driver error as it cannot open the .dbc file.
> Any suggestions?
> --
> Message posted via http://www.sqlmonster.com

server to Visual Foxpro .dbc database on network from sql server

Hi all,
I have Visual Foxpro 6.0 tables on network server inside a foxpro
database container .dbc. I have SQL server 7.0 on another server on the
network. I want to import the dbf files of foxpro into SQL server.
Can anybody suggest a way to do it. I created a linked server by giving the
path but I get the ODBC driver error as it cannot open the .dbc file.
Any suggestions?
Message posted via http://www.droptable.comTry DTS - you should be able to import the data that way assuming you have
the proper data driver for Foxpro
I have a visual foxpro driver in my list, but I'm not sure what version it
is.
"rameshwar elka via droptable.com" <forum@.droptable.com> wrote in message
news:a37fe497729140acbd10a8e569c94622@.SQ
droptable.com...
> Hi all,
> I have Visual Foxpro 6.0 tables on network server inside a foxpro
> database container .dbc. I have SQL server 7.0 on another server on the
> network. I want to import the dbf files of foxpro into SQL server.
> Can anybody suggest a way to do it. I created a linked server by giving
the
> path but I get the ODBC driver error as it cannot open the .dbc file.
> Any suggestions?
> --
> Message posted via http://www.droptable.com

server to Visual Foxpro

I am on a LAN and having trouble creating a linked server to a FoxPro
data source located on a server. When I use create a new linked server
and set the Provider String to use local directory things work fine -
that is I see a list of tables in the Tables view. If I specifiy a
directory located on a server in the provider string I see no tables.
This works:
Provider string: Driver={Microsoft Visual FoxPro
Driver};SourceDB=c:\foxdbf.dbc;
These do not work:
(Network Drive)
Provider string: Driver={Microsoft Visual FoxPro
Driver};SourceDB=G:\foxdbf.dbc;
(Network Path)
Provider string: Driver={Microsoft Visual FoxPro
Driver};SourceDB=\\server\volume\foxdbf.dbc;
Similarly, when I run the following T-SQL statement it fails against a
server directory, is successful against a local directory!
Select * from openrowset('MSDASQL','Driver={Microsoft Visual FoxPro
Driver};SourceDB=G:\foxdbf.dbc;SourceType=DBF','select * from master')
Any Suggestions
Message posted via http://www.droptable.comHi Rameshwar,
I don't have a lot of experience with linked servers, but many times with
questions like this it's a permissions issue. The account that the server is
running under needs permissions to the external directory.
Also, I read your other post where you said "I get the ODBC driver error as
it cannot open the .dbc file." (BTW, you're better off keeping all your
questions in one thread.) All VFP tables for version 6 and below are
readable via the FoxPro and Visual FoxPro ODBC driver; the latest is
downloadable from http://msdn.microsoft.com/vfoxpro/downloads/updates/ .
However, new data features were added in versions 7 and above (the latest is
VFP9) and tables with those features can only be accessed via the VFP OLE DB
data provider, downloadable from the same page as above. From your question
in this post I'm assuming that you were able to read the tables, at least
locally. Is that the case?
Cindy Winegarden MCSD, Microsoft Visual FoxPro MVP
cindy_winegarden@.msn.com www.cindywinegarden.com
"rameshwar elka via droptable.com" <forum@.droptable.com> wrote in message
news:9a658f3fe1834473ac99f66118dd2cbe@.SQ
droptable.com...
>I am on a LAN and having trouble creating a linked server to a FoxPro
> data source located on a server. When I use create a new linked server
> and set the Provider String to use local directory things work fine -
> that is I see a list of tables in the Tables view. If I specifiy a
> directory located on a server in the provider string I see no tables.

server to Visual Foxpro

I am on a LAN and having trouble creating a linked server to a FoxPro
data source located on a server. When I use create a new linked server
and set the Provider String to use local directory things work fine -
that is I see a list of tables in the Tables view. If I specifiy a
directory located on a server in the provider string I see no tables.
This works:
Provider string: Driver={Microsoft Visual FoxPro
Driver};SourceDB=c:\foxdbf.dbc;
These do not work:
(Network Drive)
Provider string: Driver={Microsoft Visual FoxPro
Driver};SourceDB=G:\foxdbf.dbc;
(Network Path)
Provider string: Driver={Microsoft Visual FoxPro
Driver};SourceDB=\\server\volume\foxdbf.dbc;
Similarly, when I run the following T-SQL statement it fails against a
server directory, is successful against a local directory!
Select * from openrowset('MSDASQL','Driver={Microsoft Visual FoxPro
Driver};SourceDB=G:\foxdbf.dbc;SourceType=DBF','se lect * from master')
Any Suggestions
Message posted via http://www.sqlmonster.com
Hi Rameshwar,
I don't have a lot of experience with linked servers, but many times with
questions like this it's a permissions issue. The account that the server is
running under needs permissions to the external directory.
Also, I read your other post where you said "I get the ODBC driver error as
it cannot open the .dbc file." (BTW, you're better off keeping all your
questions in one thread.) All VFP tables for version 6 and below are
readable via the FoxPro and Visual FoxPro ODBC driver; the latest is
downloadable from http://msdn.microsoft.com/vfoxpro/downloads/updates/ .
However, new data features were added in versions 7 and above (the latest is
VFP9) and tables with those features can only be accessed via the VFP OLE DB
data provider, downloadable from the same page as above. From your question
in this post I'm assuming that you were able to read the tables, at least
locally. Is that the case?
Cindy Winegarden MCSD, Microsoft Visual FoxPro MVP
cindy_winegarden@.msn.com www.cindywinegarden.com
"rameshwar elka via SQLMonster.com" <forum@.SQLMonster.com> wrote in message
news:9a658f3fe1834473ac99f66118dd2cbe@.SQLMonster.c om...
>I am on a LAN and having trouble creating a linked server to a FoxPro
> data source located on a server. When I use create a new linked server
> and set the Provider String to use local directory things work fine -
> that is I see a list of tables in the Tables view. If I specifiy a
> directory located on a server in the provider string I see no tables.

server to Visual Foxpro

I am on a LAN and having trouble creating a linked server to a FoxPro
data source located on a server. When I use create a new linked server
and set the Provider String to use local directory things work fine -
that is I see a list of tables in the Tables view. If I specifiy a
directory located on a server in the provider string I see no tables.
This works:
Provider string: Driver={Microsoft Visual FoxPro
Driver};SourceDB=c:\foxdbf.dbc;
These do not work:
(Network Drive)
Provider string: Driver={Microsoft Visual FoxPro
Driver};SourceDB=G:\foxdbf.dbc;
(Network Path)
Provider string: Driver={Microsoft Visual FoxPro
Driver};SourceDB=\\server\volume\foxdbf.dbc;
Similarly, when I run the following T-SQL statement it fails against a
server directory, is successful against a local directory!
Select * from openrowset('MSDASQL','Driver={Microsoft Visual FoxPro
Driver};SourceDB=G:\foxdbf.dbc;SourceType=DBF','select * from master')
Any Suggestions
--
Message posted via http://www.sqlmonster.comHi Rameshwar,
I don't have a lot of experience with linked servers, but many times with
questions like this it's a permissions issue. The account that the server is
running under needs permissions to the external directory.
Also, I read your other post where you said "I get the ODBC driver error as
it cannot open the .dbc file." (BTW, you're better off keeping all your
questions in one thread.) All VFP tables for version 6 and below are
readable via the FoxPro and Visual FoxPro ODBC driver; the latest is
downloadable from http://msdn.microsoft.com/vfoxpro/downloads/updates/ .
However, new data features were added in versions 7 and above (the latest is
VFP9) and tables with those features can only be accessed via the VFP OLE DB
data provider, downloadable from the same page as above. From your question
in this post I'm assuming that you were able to read the tables, at least
locally. Is that the case?
--
Cindy Winegarden MCSD, Microsoft Visual FoxPro MVP
cindy_winegarden@.msn.com www.cindywinegarden.com
"rameshwar elka via SQLMonster.com" <forum@.SQLMonster.com> wrote in message
news:9a658f3fe1834473ac99f66118dd2cbe@.SQLMonster.com...
>I am on a LAN and having trouble creating a linked server to a FoxPro
> data source located on a server. When I use create a new linked server
> and set the Provider String to use local directory things work fine -
> that is I see a list of tables in the Tables view. If I specifiy a
> directory located on a server in the provider string I see no tables.