Cursor Name Must Be Alias, Not .DBF Name
Article ID: 115108
Article Last Modified on 11/17/2003
APPLIES TO
- Microsoft FoxPro 2.5b for Macintosh
- Microsoft Visual FoxPro 2.5c for Macintosh
- Microsoft Visual FoxPro 3.0b for Macintosh
This article was previously published under Q115108
SYMPTOMS
The following commands will cause a syntax error:
CREATE CURSOR 'new cursor' (name c(20))
SELECT * FROM tutorial\customer INTO CURSOR 'new cursor'
CAUSE
The cursor name specified is a valid .DBF name for FoxPro for Macintosh,
but is not a valid alias name. The cursor name must be a valid alias name.
The documentation for the CREATE CURSOR command on page 282 in the
"Language Reference" and in the online Help file shows the following
syntax:
CREATE CURSOR <dbf_name>
This syntax is incorrect. It should say "<alias_name>" instead of
"<dbf_name>". The SELECT - SQL command does not specify whether a .DBF or
alias name must be used when the output is selected into a cursor. If the
query is directed into a cursor, a valid alias name must be used. If the
query is directed into a table, a valid table name must be used. Selecting
into a table instead of a cursor allows the use of spaces within a table
name.
RESOLUTION
To avoid this problem, do the following:
- Use a valid alias name. A valid alias name can contain up to 10 letters,
digits, or underscores, and must begin with a letter or an underscore.
- If the output filename must contain spaces, use the CREATE TABLE or
SELECT ... INTO TABLE commands.
Additional query words: VFoxMac FoxMac docerr
Keywords: KB115108