Home > Software engineering >  Sqlite3 database tables are created
Sqlite3 database tables are created

Time:10-04

I use c + + to create the database under wince,
 sqlite3_open (" \ \ Nand \ \ Data. The db ", & amp; Db); 
built after the db files, create the table in question, the code below
 sqlite3_exec (db, "create table 1111 (ID integer, name varchar (32))", NULL, NULL, & amp; Errmsg); 
create a database table name is 1111, and now I want to build dynamic table, I will get a second time, so I want to use the date as a dynamic table, for example is a table of 0208 today, tomorrow will automatically save the received data to the database of 0209 new table inside, please understand the great god glad!

CodePudding user response:

Using cstrings or sprintf formatting SQL statements,

CodePudding user response:

Decomposition of demand, need to go to check information

1. Create date as table name
2. To find the table if there is a
3. Insert the data

This is easy,

CodePudding user response:

reference 1st floor zyq5945 response:
using cstrings or sprintf formatting SQL statements,


Way to know, but a write error, and now finally understand, data table can not directly use Numbers beginning!

CodePudding user response:

refer to the second floor tajon1226 response:
decomposition demand, I need to check information

1. Create date as table name
2. To find the table if there is a
3. Insert the data

This is easy,


The data table can not directly use Numbers beginning!
  • Related