Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Remote Views - Problem accessing from application

Status
Not open for further replies.

DTRNTR

MIS
Jun 27, 2000
34
US
Greetings FoxPro Gurus!

I have a Visual FoxPro Database with a Remote View to a FoxPro 2.6 Table (Employees). From the command window, within VFP, I can access this remote view and join it with other local tables without any problem.

When I reference the Remote View from a Visual InterDev application, I receive the following error:
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Visual FoxPro Driver]Function is not supported on remote tables.

The sql causing the error is simply 'Select * from Employee'.

Should what I'm trying to do work (is anyone else doing this), or is my problem related to the database drivers setup on the database server???

Thanks in advance for any help you can provide!
 
Robert,

No I'm not using SQLEXEC() to do the query. I assume from your question that I should be.... Can you elaborate as to why this would be necessary specifically for a Remote View?

Thanks....

 
Well, a remote view (as opposed to a local view) implies a remote, non-VFP data source such as SQL Server, Oracle, Access, and so forth. If you are using ODBC to open the DBF then you have a remote view (if you are not using ODBC, then disregard this discussion).
Robert Bradley
 
The Remote view is accessing a stand-alone FoxPro 2.6 Table.

I expected that once my View was properly set up (regardless of whether it was Local or Remote) that any applications accessing them (via SQL statements) would do so in the same manner as accessing a table. In other words, transparent to my calling application.
 
Ah, sorry, I was on a parallel track. Yes, with a stored remote view (one defined and stored in the DBC) you can treat it like a native table (more or less, depending on your buffering settings). So yes, you could
[tt]select * from MyRemoteView[/tt]
and it should work.

On most of the machines on which I've worked, there were several different DBF drivers, and when I've chosen the wrong one it did in fact fail. If you have another DBF driver available in your ODBC drivers list, try it instead.
Robert Bradley
 
FYI....
I got the Remote view to work by selecting the 'Share Connection' check box under the Remote Data tab (Tools - Options - Remote Data) before setting up the connection that is used within my remote view.
 
Hello.

The Remote wiew should work fine without the 'share connection'. Whithout it, the odbc driver should make by itself another thread to datasource. If you've solved your problem, I really think that you've done something else in plus...

Grigore Dolghin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top