Re: [sqlite] table names on the fly

2012-01-12 Thread John Gillespie
Alternatively in tcl : dbcmd eval { create table mytable ( aaa integer, text) } dbcmd eval { insert into mytable (aaa,bbb) values (1, '') } dbcmd eval "select * from mytable" loopvar { # loopvar(*) contains the column names, loopvar(aaa) contains 1, loopvar(bbb) contains "zzz

Re: [sqlite] table names on the fly

2012-01-11 Thread Igor Tandetnik
On 1/11/2012 3:53 PM, inq1ltd wrote: Can someone tell me how to get the column names contained in a table on the fly. Prepare a statement of the form "select * from mytable;" (no need to actually run it), then use sqlite3_column_count and sqlite3_column_name[16]. Alternatively, execute PRAGM

Re: [sqlite] table names on the fly

2012-01-11 Thread inq1ltd
On Wednesday, January 11, 2012 09:58:17 PM Petite Abeille wrote: > On Jan 11, 2012, at 9:53 PM, inq1ltd wrote: > > Can someone tell me how to get the column names > > contained in a table on the fly. > > pragma table_info > ___ > sqlite-users mailing li

Re: [sqlite] table names on the fly

2012-01-11 Thread Petite Abeille
On Jan 11, 2012, at 9:53 PM, inq1ltd wrote: > Can someone tell me how to get the column names > contained in a table on the fly. pragma table_info ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/

Re: [sqlite] table names on the fly

2012-01-11 Thread inq1ltd
sqlite help, Can someone tell me how to get the column names contained in a table on the fly. Col names are altered and added by a front end program and I want to detect the column names while the DB is in use. I would appreciate the help. jd _