Hello,
Could someone please tell me how to trap an OLE/DB error while using a Stored Procedure that executes the OPENQUERY command? What I want to be able to do is know when a table in the Linked Server is not available. The data is in a VFP table and I can cause the error if I first get the table exclusive in FoxPro. It will return the following when I call the sp in Query Analyzer:
Server: Msg 7399, Level 16, State 1, Line 1
OLE DB provider 'MSDASQL' reported an error.
[OLE/DB provider returned message: [Microsoft][ODBC Visual FoxPro Driver]Cannot open file rolls.dbf.]
The sp then stops after the line EXEC (SqlString) in my sp and returns to the Query Analyzer displaying the above message. I'm uncertain as to how to trap the OLE/DB error since @@Error does not seem to set anything.
Thanks for any help.
Darrell
Could someone please tell me how to trap an OLE/DB error while using a Stored Procedure that executes the OPENQUERY command? What I want to be able to do is know when a table in the Linked Server is not available. The data is in a VFP table and I can cause the error if I first get the table exclusive in FoxPro. It will return the following when I call the sp in Query Analyzer:
Server: Msg 7399, Level 16, State 1, Line 1
OLE DB provider 'MSDASQL' reported an error.
[OLE/DB provider returned message: [Microsoft][ODBC Visual FoxPro Driver]Cannot open file rolls.dbf.]
The sp then stops after the line EXEC (SqlString) in my sp and returns to the Query Analyzer displaying the above message. I'm uncertain as to how to trap the OLE/DB error since @@Error does not seem to set anything.
Thanks for any help.
Darrell