Hi exxos,

 

A command-object may be used for SELECT, UPDATE and INSERT.

You then decice what kind of command you want to be generated by calling on of 
the following functions:

 

// SELECT

String sql = cmd.getSelect();

// UPDATE

String sql = cmd.getUpdate();

// INSERT

String sql = cmd.getInsert();

// INSERT INTO

String sql = cmd.getInsertInto(...);

 

Regards

Rainer

 

 

from: exxos [mailto:[email protected]] 
to: [email protected]
re: Centralize methods on the DB object

 

Hi,

 

// SELECT
DBCommand cmd = db.createCommand();

 

Why there is no equivalances of above for the UPDATE and the INSERT?

 

DBCommand cmd = db.insertCommand();
DBCommand cmd = db.updateCommand();

 

Regards.

Reply via email to