void SetSQL( LPCTSTR lpszSQL );
throw( CDaoException, CMemoryException );
Parameters
lpszSQL
A string containing a complete SQL statement, suitable for execution. The syntax of this string depends on the DBMS that your query targets. For a discussion of syntax used in the Microsoft Jet database engine, see the topic "Building SQL Statements in Code" in DAO Help.
Remarks
Call this member function to set the SQL statement that the querydef executes. A typical use of SetSQL is setting up a querydef object for use in an SQL pass-through query. (For the syntax of SQL pass-through queries on your target DBMS, see the documentation for your DBMS.)
For information about querydefs, see the article DAO Querydef in Visual C++ Programmer's Guide. For more information about SQL, see the topics "SQL Property", "Microsoft Jet Database Engine SQL Data Types", and "Querying a Database with SQL in Code" in DAO Help.
CDaoQueryDef Overview | Class Members | Hierarchy Chart
See Also CDaoQueryDef::GetSQL, CDaoQueryDef::SetName, CDaoQueryDef::SetConnect, CDaoQueryDef::SetODBCTimeout, CDaoQueryDef::SetReturnsRecords