On Saturday, January 20, 2007, 6:54:00 PM, Thomas 
Fjellstrom<sqlite-users@sqlite.org> wrote:
> On Saturday 20 January 2007 6:29 am, [EMAIL PROTECTED] wrote:
>> Mark Richards wrote:
>> > [EMAIL PROTECTED] wrote:
>> > > What is the easiest way to retrieve the structure of a table? The only
>> > > thing i have found so far is by parsing the `sqlite_master`.`sql`
>> > > which seems to be too much coding. I want them as (char**
>> > > column_names), (char **column_types) or something similar.
>> > > thanks in advance
>> > > Ivailo Karamanolev
>> >
>> > .schema {tablename}
>> >
>> > sqlite3
>> > .help
>>
>> 1. Isn't that supposed to return the SQL syntax for the table
>> creation?
>> 1.1. I would like to do this from the C API

> exec ".schema tablename" from the C api's sql query function.

>>
>> 2. How am i supposed to write replies to someone's post in this mailing
>> list?

> Its email, select a message and press "reply".

>> Thanks in advance.
>> Ivailo Karamanolev
>>
>>
>> ---------------------------------------------------------------------------
>>-- To unsubscribe, send email to [EMAIL PROTECTED]
>> ---------------------------------------------------------------------------
>>--

Am I stupid, or you assume something that I don't know for obvious?

I wrote sqlite3_exec(...., ".shema test", ....). The response was:
> Near ".": Syntax Error
I wrote that in the sqlite3 command line utility, except that it
returned nothing (just wrote sqlite3> again) which is offtopic, I
assume that it must print something similar to
CREATE TABLE `test` (...... )
which I already achieved by accessing `sqlite_master`.`sql` field.
However, that is not precisely what I want, because I still must parse
the "CREATE TABLE" SQL syntax myself, which is way too much coding. Is
there another, simpler way, or I must satisfy myself with the need to
parse SQL?

PS. To all developers of SQLite - I am surprised to see so good piece
of C code :)

Thanks in advance,
Ivailo Karamanolev.


-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to