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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

OpenQuery/LinkedServer

Status
Not open for further replies.

cp84

Programmer
Apr 2, 2003
11
0
0
GB
I have 2 examples of stored procs the first works and the second gives the error "The OLE DB Provider 'MSDASQL' inicates that the object has no columns"

Ex.1
SELECT * FROM OPENQUERY(LinkedServer,'Select de_refno,de_name FROM Departmt ORDER BY de_refno')

Ex.2
SELECT * FROM OPENQUERY(LinkedServer,'UPDATE Departmt SET de_name='' WHERE de_refno=''yyy''')

The data files are FoxPro 2.6 DOS and the SystemDSN is using Microsoft VFP Driver

Any help most appreciated
 
Well the second is an UPDATE query so won't return any rows. What are you trying to do?

--James
 
Thanks James, all I want to achieve is to update the FoxPro files that the SELECT command returns. Can this be achieved thro a stored proc?
 
If you've got the linked server set up, try simply qualifying the name of the table:

Code:
UPDATE linkedserver.dbname.dbo.department
SET de_name = 'xxx'
WHERE de_refno = 'yyy'

--James
 
FoxPro 2.6 is just a list of .dbf tables and not part of a single Database. Can a catalog or schema be created to allow the connection? as I cannot create a four-part name as it stands now.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top