Re: [sqlite] how to get the meta type of a column

2010-02-04 Thread gujx
:41:46PM -0800, gujx scratched on the wall: >> >> Maybe I didn't express the problem clearly. >> > e.g. if you have a text value, you use _text(), if you have an int, you >> > use _int() > >> I just don't know what type I have, > > If all you h

Re: [sqlite] how to get the meta type of a column

2010-02-04 Thread gujx
Jay A. Kreibich-2 wrote: > > On Thu, Feb 04, 2010 at 03:59:14PM +0800, gujx scratched on the wall: >> There is a table like this: > > >> Is there any way to resolve this? > > First off, you need to understand that columns do not have "types", > they

[sqlite] how to get the meta type of a column

2010-02-04 Thread gujx
There is a table like this: id(varchar) name(text) age(integer) ss(text) Its name is “test_for_cpp”, now I get the pointer of sqlite successfully. There are codes below: sqlite3_stmt *ppStmt; const char *pzTail; int nVal = sqlite3_prepare_v2( conn,

[sqlite] how to get the type of a parameter

2010-01-27 Thread gujx
Hi, I had a question puzzled me. How can I get the type of a parameter in a prepared SQL. For example, the code is: sqlite3 *conn; if (SQLITE_OK != sqlite3_open("testBind.db", &conn)) { printf("can't open the database."); return ; } if(SQLITE_OK != sqlite3_ex

[sqlite] how to get the type of a parameter

2010-01-27 Thread gujx
Hi, I had a question puzzled me. How can I get the type of a parameter in a prepared SQL. For example, the code is: sqlite3 *conn; if (SQLITE_OK != sqlite3_open("testBind.db", &conn)) { printf("can't open the database."); return ; } if(SQLITE_OK != sqlite3_ex

[sqlite] size control of sqlite database

2010-01-14 Thread gujx
Hi, I’d like to ask some question about the interface of the sqlite resource. Whether there is some interface to control the size of a database, for example, if I want to create a database with 5M initialized, how can I do that? And when I make change to a database, for example, insert a row to a