Re: [sqlite] sqlite3_get_table(); How to get all column names in C?

2008-01-05 Thread Dennis Cote
Jerry Krinock wrote: Is there any way to get a list of all column names in a table via the C API, which works even when there are no data rows in the table? Jerry, You can get the column names for any query, including a "select * from table", using the prepared statement APIs. After you

Re: [sqlite] sqlite3_get_table(); How to get all column names in C?

2008-01-02 Thread Jerry Krinock
On 2008 Jan, 02, at 15:52, Jay Sprenkle wrote: Did you try to query the table 'sqlite_master'? You can get the schema for any table by referencing the query results.. Thank you, Jay. I kept getting syntax errors when I tried that; apparently I don't know how to query the sqlite_master.

Re: [sqlite] sqlite3_get_table(); How to get all column names in C?

2008-01-02 Thread Jay Sprenkle
Did you try to query the table 'sqlite_master'? You can get the schema for any table by referencing the query results.. On Jan 2, 2008 4:52 PM, Jerry Krinock <[EMAIL PROTECTED]> wrote: > Is there any way to get a list of all column names in a table via the > C API, which works even when there are

[sqlite] sqlite3_get_table(); How to get all column names in C?

2008-01-02 Thread Jerry Krinock
Is there any way to get a list of all column names in a table via the C API, which works even when there are no data rows in the table? The example given for sqlite3_get_table() indicates that the column names are returned as the "zeroth" row. Indeed, it states: "In general, the number of