PRB: RQBE Not Generating FROM Clause When .QPR Table MissingLast reviewed: April 29, 1996Article ID: Q108164 |
The information in this article applies to:
SYMPTOMSWhen a table in a query (.QPR) file cannot be found, the Relational Query By Example (RQBE) tool loads the remaining (found) tables in the query, but doesn't generate the FROM clause unless the table set is modified (using ADD or CLEAR).
STATUSThis behavior is by design.
MORE INFORMATIONThe following code demonstrates this behavior. It creates two tables (databases) and creates a query based on them. It then deletes one of the tables and reopens the query. This second time, the FROM list will have been removed from the SQL statement.
ERASE TBLTEST.QPR CLOSE ALL SET SAFETY OFF CREATE TABLE tbl1 (keyfield c(3)) INSERT INTO tbl1 (keyfield) VALUES ("AAA") INSERT INTO tbl1 (keyfield) VALUES ("BBB") INSERT INTO tbl1 (keyfield) VALUES ("CCC") SELECT 0 CREATE TABLE tbl2 (keyfield c(3)) INSERT INTO tbl2 (keyfield) VALUES ("BBB") INSERT INTO tbl2 (keyfield) VALUES ("BBB") INSERT INTO tbl2 (keyfield) VALUES ("BBB") INSERT INTO tbl2 (keyfield) VALUES ("CCC") INSERT INTO tbl2 (keyfield) VALUES ("CCC") INSERT INTO tbl2 (keyfield) VALUES ("AAA") SELECT tbl1 WAIT WINDOW "This will now create the query. Please add TBL2 to the" WAIT WINDOW "query as well as the field TBL2.KEYFIELD. View the SQL" WAIT WINDOW "(noticing the FROM line), RUN it and then save" WAIT WINDOW "and close it." CREATE QUERY tbltest SELECT tbl2 USE DELETE FILE tbl2.dbf SELECT tbl1 WAIT WINDOW "I've now deleted the table. When the RQBE Window " WAIT WINDOW "attempts to open again, press Cancel when prompted to" WAIT WINDOW "find the TBL2 file. Add TBL1.KEYFIELD back to the" WAIT WINDOW "fields list, and look under View SQL. Notice that the" WAIT WINDOW "list of tables and fields is no longer in the SELECT" WAIT WINDOW "Statement." MODIFY QUERY tbltest |
Additional reference words: VFoxWin FoxDos FoxWin 2.50 2.50a 2.50b
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |