Deepak Kaul said:

> 1.  Calling sqlite_exec within my C++ program

Good for one-off statements, like DDL.  If you have to generate the SQL
and deal with parameters though, this option is no good.

> 2.  Calling sqlite_prepare, sqlite3_step and sqlite3_finalize within my
> C++ program

Best for multi-use statements, or when use-supplied data needs to be used.

> 3.  Calling ::system with the following string "/usr/bin/sqlite3
> database.db < file.txt"
>      Where file.txt contains ".read sqlstatements.txt"
>      Where sqlstatements.txt contains sql statements to be executed.

Fire the programmer you catch/caught doing this.  Deny that they ever
worked for your organization.

Clay
-- 
Simple Content Management
http://www.ceamus.com

Reply via email to