On Thu, 9 Feb 2012 05:07:05 -0800 (PST), bhaskarReddy <uni...@gmail.com>
wrote:

>
>Is it possible to find the data type, even if the table doesn't have data.  
>That means, my requirement is, 
>
>1. I want to find the number of columns in the table. ( I already done.)
>2. I want to find the names of the columns. (I already done.)
>3. I want to find the data types. Because, if it is an integer i'll use
>s***_bind_int(), else if it is test i'll use s***_bind_text().
>
>Now if the table is empty, i want to find the data types and according to
>that i want to fill the row.
>
>So is there any way to find the data types even if the  table is empty.
>(i.e., Table is there, columns and their names are there but no data in that
>table.)

http://www.sqlite.org/c3ref/table_column_metadata.html
or
http://www.sqlite.org/c3ref/column_decltype.html 
or execute the
        PRAGMA table_info(yourtablename);
statement and process the resultset.

>Regards,
>Bhaskar.

-- 
Regards,

Kees Nuyt

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

Reply via email to