You'll have to call sqlite3_column_name() in a loop to find the named column
returned from a prepared select statement.

As for the default values, to get that information you'll have to execute a
"PRAGMA TABLE_INFO(tablename)" query and examine the 5th column "dflt_value"
for the row matching the column name you're interested in.


-----Original Message-----
From: sqlite-users-boun...@sqlite.org
[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Shaun Seckman
(Firaxis)
Sent: Wednesday, June 24, 2009 9:18 AM
To: General Discussion of SQLite Database
Subject: [sqlite] Two simple questions

Just two quick and simple questions :)

 

                In a prepared statement, is there a quick way to
determine what the index of a column with a specific name is or must I
just iterate through all columns and perform a string comparison?

 

                How can I go by determining the default value of a
column?

 

-Shaun

 

 

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


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

Reply via email to