That was a premature guess because it works to do this in sqlite3 at the 
command prompt on Windows.  
That may mean that the DLL is not right?

Here's what I ran and the output from it on both Windows XP Pro and Linux (Suse 
9.1):

import apsw
import os
try:
  os.remove ('test1.db3')
except:
  pass
db = apsw.Connection('test1.db3')
cursor=db.cursor()
cursor.execute ('create table testone (bigid INTEGER PRIMARY KEY 
AUTOINCREMENT,name TEXT)')
cursor.execute('PRAGMA empty_result_callbacks = 1')
sql="select * from testone"
cursor.execute (sql)
description = cursor.getdescription()


OUTPUT ON WINDOWS XP:
>python test_pragma.py
Traceback (most recent call last):
  File "test_pragma.py", line 9, in ?
    cursor.execute ('create table testone (bigid INTEGER PRIMARY KEY 
AUTOINCREMENT,name TEXT)')
apsw.SQLError: SQLError: near "AUTOINCREMENT": syntax error

C:\Documents and Settings\Scott Chapman\My Documents\development\misc\sqlite>
C:\Documents and Settings\Scott Chapman\My Documents\development\misc\sqlite>
C:\Documents and Settings\Scott Chapman\My Documents\development\misc\sqlite>
C:\Documents and Settings\Scott Chapman\My Documents\development\misc\sqlite>
C:\Documents and Settings\Scott Chapman\My 
Documents\development\misc\sqlite>del test1.db3

C:\Documents and Settings\Scott Chapman\My 
Documents\development\misc\sqlite>sqlite3 test1.db3
SQLite version 3.1.3
Enter ".help" for instructions
sqlite> create table testone (bigid INTEGER PRIMARY KEY AUTOINCREMENT,name 
TEXT);
sqlite> .quit

>

OUTPUT on LINUX
> python test_pragma.py
Traceback (most recent call last):
  File "test_pragma.py", line 13, in ?
    description = cursor.getdescription()
apsw.ExecutionCompleteError: Can't get description for statements that have 
completed execution
>


On Saturday 05 March 2005 09:10 pm, Scott Chapman wrote:
> I'm not able to duplicate this on Linux with fresh compiles of everything.
> That leads me to believe the binary I downloaded for Windows is not built
> on 3.1.3 after all.
>
> Scott
>
> On Saturday 05 March 2005 06:01 pm, Scott Chapman wrote:
> > Windows XP Pro, Python 2.3.4, sqlite 3.1.3
> > I'm getting this wierd error from sqlite.  It only happens when I access
> > this database with Python/APSW.  I can access it with sqlite and
> > sqlite3explorer just fine.
> >
> >  >sqlite3 test1.db3
> >
> > SQLite version 3.1.3
> > Enter ".help" for instructions
> > sqlite> create table test (id INTEGER PRIMARY KEY AUTOINCREMENT,name
> > text); sqlite> .quit
> >
> > C:\Documents and Settings\Scott Chapman\My
> > Documents\development\misc\sqlite>python apsw_pragma.py test1.db3
> > Traceback (most recent call last):
> >   File "apsw_pragma.py", line 37, in ?
> >     dosql(sql)
> >   File "apsw_pragma.py", line 19, in dosql
> >     cursor.execute(query)
> > apsw.AbortError: AbortError: malformed database schema - near
> > "AUTOINCREMENT": syntax error
> >
> > Cordially,
> > Scott

Reply via email to