Thanks, Ted. I'll give this a shot.
Regards,
Nick.
Teg wrote:
>
> Hello nshaw,
>
> std::string m_sSQL = "CREATE TABLE IF NOT EXISTS ";
> m_sSQL += g_pszTableName;
> m_sSQL += "(" ;
> m_sSQL += "AR_Filename TEXT PRIMARY KEY,"
> ;
> m_sSQL += "AR_Subject TEXT ," ;
> m_sSQL += "AR_From TEXT ," ;
> m_sSQL += "AR_Group TEXT ," ;
> m_sSQL += "AR_GoodBlocks INTEGER" ;
> m_sSQL += ");" ;
>
> HRESULT hr = Exec
> (
> m_sSQL.c_str()
> );
>
> //
> // Paramaterized insert with values bound later
> //
> std::string m_sSQL = "INSERT OR IGNORE INTO ";
> m_sSQL += g_pszTableName;
> m_sSQL += " VALUES (?,?,?,?,?,?,?);";
>
>
> std::string m_sSQL = "insert into family (member,age) values ";
> m_sSQL += "(" ;
> m_sSQL += name;
> m_sSQL += "," ;
> m_sSQL += "age" ;
> m_sSQL += ");" ;
>
>
> if you want to do straight C you need something like a sprintf or use
> SQLite's printf routines. I build everything in a C++ string then pass
> is using the ".c_str()" operator. I recommend parameterized inserts
> too.
>
> C
>
>
> --
> Best regards,
> Teg mailto:[EMAIL PROTECTED]
>
>
> -----------------------------------------------------------------------------
> To unsubscribe, send email to [EMAIL PROTECTED]
> -----------------------------------------------------------------------------
>
>
>
--
View this message in context:
http://www.nabble.com/Passing-Arguments-to-SQLite3-from-C%2B%2B-tf3548345.html#a9910750
Sent from the SQLite mailing list archive at Nabble.com.
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------