Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Accessing VFP Tables from SQL 7.0 using a Linked Server
Message
From
14/11/1999 14:53:48
 
 
To
04/11/1999 12:10:35
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00286750
Message ID:
00291123
Views:
23
Dear Stephen lea and Bob archer,

I had a same problem accessing a VFP database using a linked is server

A create a linked server en with the statement

SELECT mycursor.* FROM OPENROWSET(linkedserver,'SQL statement') as mycursor

a create a view.

Everthing is working accept updating memo files.
If i choose a view without a memo everthing work,
but with a memo i recieve a message query based on insertion or update of
blob files can not be supported

maybe you can help me

Kind regards



jan Dorresteijn





>I have managed to find a knowledge base article which allows you to look at DBF and DBC tables from SQL Server 7.0, but not through linked servers.
>
>The knowledge base article number is QQ207595.
>
>Basically, if you want to return data from a VFP DBF file, do the following:
>
>SELECT * FROM OPENROWSET('MSDASQL','Driver={Microsoft Visual FoxPro Driver};SourceDB=\\pathrequired\;SourceType=DBF','SELECT STATEMENT')
>
>For example
>
>SELECT * FROM OPENROWSET('MSDASQL','Driver={Microsoft Visual FoxPro Driver};SourceDB=\\jf_lon_srv00\genesis\foxpro2\data\;SourceType=DBF','SELECT id FROM nad where id = "1011234"')
>
>This will return all the rows in the OPENROWSET Query
>
>You can also specify
>
>SELECT id FROM OPENROWSET('MSDASQL','Driver={Microsoft Visual FoxPro Driver};SourceDB=\\jf_lon_srv00\genesis\foxpro2\data\;SourceType=DBF','SELECT * FROM nad where id = "1011234"')
>
>This will only return the id from the query even though you specified a select * in the OPENROWSET.
>
>If you have an DSN (User or Machine level) you can simplify this query as follows:
>
>SELECT id FROM OPENROWSET('MSDASQL','DSN=London JFDB Fox','SELECT * FROM nad WHERE id = "1011234")
>
>Providing the user has access to the registry key or the DSN file in the ODBC Data Sources directory this will also work.
>
>It is possible to do joins between SQL Tables and VFP tables using aliasing.
>
>For example
>
>select a.idnumber,a.peptype,client.otherreference from openrowset('MSDASQL',
> 'DSN=London JFDB Fox',
> 'select * from cash where idnumber = "OAK4753"') as a join
> t2.dbo.client as client on client.otherreference = a.idnumber
>
>will return the idnumber and peptype fields from a fox table called cash, and their relevant reference in the t2 client table (which is sitting on a SQL server).
>
>The above principles also work for DBC's, you just have to specify the DBC file name in the SourceDB clause amd change the SourceType to DBC.
>
>Hope this helps.
>
>Cheers
>Stephen Lea
Previous
Reply
Map
View

Click here to load this message in the networking platform