Edwin Knoppert wrote:

I'm not using c and thus i do not compile the source into my app :)
So i'm calling sqlite3_get_table() to obtain data.
It's purely to instruct the sqlite 3 dll, think as if i'm where using VB6 (without some 'odd' wrapper/helper dll's)
I'm actually using PowerBASIC - PB/WIN80.


SQLite version 3.1.3.1
Enter ".help" for instructions
sqlite> create table aaa(i integer, t text);
sqlite> .mode line
sqlite> pragma table_info(aaa);
      cid = 0
     name = i
     type = integer
  notnull = 0
dflt_value =
       pk = 0

      cid = 1
     name = t
     type = text
  notnull = 0
dflt_value =
       pk = 0
sqlite>


You can issue/execute a pragma as a query. From a pythonwin session:

>>> import sqlite
>>> con=sqlite.connect("test")
>>> csr=con.cursor()
>>> csr.execute("create table aaa(i integer, t text)")
>>> csr.execute("pragma table_info(aaa)")
>>> result=csr.fetchall()
>>> for r in result:
...     print r
... (0, 'i', 'integer', 0, None, 0)
(1, 't', 'text', 0, None, 0)
>>>

Martin aka xqp [my first post too]

Reply via email to