ID: Q99912
2.50 2.50a | 2.50 2.50a
MS-DOS | WINDOWS
kbinterop kbprg kberrmsg kbprb
The information in this article applies to:
Assigning SYS(3) to a variable and then referring to that variable as a name expression for the cursor name in an SQL statement causes a "Syntax Error" in FoxPro 2.5 for MS-DOS and Windows, but not in FoxPro 2.0 for MS-DOS.
SYS(3) returns a character type filename that contains only numbers.
To work around this problem, do one of the following:
x='test'
USE customer
SELECT * FROM customer INTO CURSOR (x)
USE customer
SELECT * FROM customer INTO CURSOR "_"+SUBSTR(SYS(2015),4)
1. Start FoxPro 2.0.
2. In the Command window, type the following commands:
X=SYS(3)
USE CUSTOMER
SELECT * FROM CUSTOMER INTO CURSOR(X)
The SELECT statement works as anticipated in FoxPro 2.0. Repeat this
procedure with FoxPro 2.5 for MS-DOS and Windows; a "Syntax Error"
occurs after the SELECT statement is executed.
Additional reference words: FoxDos FoxWin 2.50 2.50a errmsg err msg KBCategory: kbinterop kbprg kberrmsg kbprb KBSubcategory: FxprgSql
Last Reviewed: November 23, 1998