PRB: "Syntax Error" Caused by SYS(3) and Name Expression

ID: Q99912

2.50 2.50a | 2.50 2.50a

MS-DOS     | WINDOWS
kbinterop kbprg kberrmsg kbprb

The information in this article applies to:

SYMPTOMS

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.

CAUSE

SYS(3) returns a character type filename that contains only numbers.

RESOLUTION

To work around this problem, do one of the following:

MORE INFORMATION

Steps to Reproduce Problem

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