Using DB.SQL.QUERY with Type 2 Requires Double Single QuotesLast reviewed: November 3, 1994Article ID: Q70067 |
SUMMARYThe command DB.SQL.QUERY(), provided by the add-in QE.XLA, allows you to send SQL queries to Q+E. The query is executed by Q+E and the results are returned to Excel. When sending a query that contains a text comparison criteria, it is necessary to place the criteria inside double single quotation marks. (for example, ``NC''). Without the double single quotation marks, the command will return #REF.
MORE INFORMATION
DB.SQL.QUERY(type,query,destination,filename,linked)The first argument, "type", is a number from 1 to 3 indicating the type of query to be executed.
The following example:
ExampleA1 =INITIATE("qe","system") A2 =ACTIVATE("sheet1") A3 =DB.SQL.QUERY(2,"select * from dBASEfile | d:\excel\xl3\qe\addr.dbf where STATE=''NC''",1)A4 =RETURN()
REFERENCES"Microsoft Q+E for Excel User's Guide." Version 3.00, pages 68-71. "README.TXT", Microsoft Excel version 3.00, Section 3.
|
KBCategory: kbother
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |