Data Access User Manual > Data Access and SQL > SQL Tables > Structural Definition > A Shortcut C++ Definition
 
A Shortcut C++ Definition
The setQueryFrom member function allows you to define an IliSQLTable that has only one database table. Here is an example:
IlvDisplay* display;
...
// Create the IliSQLTable object.
IliSQLTable* sqlTbl = new IliSQLTable(display);
sqlTbl->lock();
 
// Define its session.
IliSQLSession* session;
session = new IliSQLSession(“oracle”, “scott/tiger@orasrv”);
sqlTbl->setSQLSession(session);
 
// Define the IliSQLTable object.
IliSQLTableRef tblRef(“EMP”, “SCOTT”);
sqlTbl->setQueryFrom(tblRef);
The setQueryFrom member function reads the schema of the given database table and defines the IliSQLTable object accordingly.

Version 6.0
Copyright © 2015, Rogue Wave Software, Inc. All Rights Reserved.