Hi Friends,

               I have two arrays, one is representing field names and
another array representing field types. I am passing these two arrays to
another function which will create a table using sqlite3_exec.

                               #define   INTEGER 0
                               #define   TEXT        1

               Ex:           char *col_names[] = {"slotId", "cardId",
"swversion"};
                               int     arr[] = {0,0,1};

                               create_table (tableName, col_names, arr);

    Now in the function  create_table(const char *tableName, const char
*col_names, int *ptr)
                                   {
                                                    char *query;

                                                    query = "create table
tableName (fieldNames and fieldTypes) ;";
the actual database name and field names and values should come.

                       Can any one tell me how to do this.


Regards,
BhaskarReddy.
                                   }
-- 
View this message in context: 
http://old.nabble.com/how-to-vice-variable-names-in-CREATE-query.-tp33200658p33200658.html
Sent from the SQLite mailing list archive at Nabble.com.

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to