Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Bugs/Errors with SQL Pass Through
Message
From
01/05/2003 07:32:18
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Bugs/Errors with SQL Pass Through
Miscellaneous
Thread ID:
00783593
Message ID:
00783593
Views:
58
I have been testing an application that uses SQL Pass Through (SPT) with SQL Server under VFP 8.

A range of what appear to be undocumented behaviour changes, errors and bugs have emerged in VFP8. The problems do not appear under VFP6/7. All updates back to the SQL Server are handled manually, so the SPT cursors do not need to carry out any form of updating.

1. When creating a cursor using a command similar to SQLEXEC(m.SqlHandle, "SELECT * FROM test", "test") empty memo fields are returned. I do not know if this is connected to the "FetchMemo" property, but can find no way to set this before returning results.

2. When I attempt to look at a memo field in the cursor the error 'No update tables are specified. Use the Tables property of the cursor (Error 1491)' is returned. Presumably this is connected with the issue 1 above.

3. If I reissue any further SQLEXEC commands the error 'Invalid call issued while executing a SQLMORERESULTS( ) sequence (Error 1475)' is returned. Again presumed to be connected with the fact that the cursor does not yet contain any memo data.

The behaviour listed above is easily replicable and demonstrably different in VFP 8 to VFP 6/7 using the following sample code. Any suggestions?
* Open connection to SQL Server
m.SqlHandle = SQLSTRINGCONNECT("Driver={Sql Server};Server=127.0.0.1;Database=northwind;UID=sa;PWD=;")

* Open an SPT cursor containing memo fields
? SQLEXEC(m.SqlHandle, "SELECT * FROM employees", "employees")

* Display the contents of a memo field (Error 1491)
? notes

* Issue another query (Error 1475)
? SQLEXEC(m.SqlHandle, "SELECT * FROM orders", "orders")

? SQLDISCONNECT(m.SqlHandle)
Next
Reply
Map
View

Click here to load this message in the networking platform