No data is returned in Visual FoxPro when you use the TOP clause to retrieve data from a table in SQL Server 7.0 or in SQL Server 2000 (260526)
The information in this article applies to:
- Microsoft Visual FoxPro for Windows 3.0
- Microsoft Visual FoxPro for Windows 3.0b
- Microsoft Visual FoxPro for Windows 5.0
- Microsoft Visual FoxPro for Windows 5.0a
- Microsoft Visual FoxPro for Windows 6.0
- Microsoft Visual FoxPro for Windows 7.0
- Microsoft Visual FoxPro 8.0
- Microsoft Visual FoxPro 9.0 Professional Edition
This article was previously published under Q260526 SYMPTOMSWhen using the TOP clause in a SELECT-SQL statement that is retrieving data from a table in a SQL Server 7.0 or SQL Server 2000 database, no data is returned to Visual FoxPro.
CAUSE
The TOP clause is new to SQL Server 7.0 and SQL Server 2000. The reason that no data is being returned is that the compatibility mode on the database from which the data is being retrieved is set to 6.5.
RESOLUTION
Change the compatibility mode of the database to 7.0 or 8.0 (for SQL Server 2000). This allows the correct data to be returned. The different modes for SP_DBCMPTLEVEL are 60, 65, 70, 80; see SP_DBCMPTLEVEL in SQL Server Books Online for more information.
STATUS
This behavior is by design.
REFERENCESFor additional information on determining SQL Server Compatibility Levels, click the article number below
to view the article in the Microsoft Knowledge Base:
233508 HOWTO: Determine Compatibility Level of a SQL Server 7 Database
Modification Type: | Major | Last Reviewed: | 3/17/2005 |
---|
Keywords: | kbCodeSnippet kbprb kbSQLProg KB260526 |
---|
|