At 07:13 17.07.2009, Michael J. Leaver wrote: thanks for digging deeper into this. Unfortunately, I can not tell the cause without seeing your code. I assume that you might not reset of finalize a prepared statement. Could you please post your code (sources only, no executables) so I can reproduce? Also: please let me know version of DISQLite3 and Delphi are you using. Ralf >I can now reproduce this, and the exception only occurs if I create an index >before calling the bind and step: > > FDB.Execute16('CREATE INDEX NameIndex ON List(Name)'); > >Why does creating an index cause step to raise an exception? If I don't >create an index then there is no exception. > >The table is defined as follows: > > CREATE TABLE List ( > "Name" TEXT COLLATE USERNOCASE, > "FSize" INTEGER, > "FVersioned" REAL, > "FDateTime" REAL, > "FFileAttr" INTEGER, > "FVerType" INTEGER > ) > >The collation is created as follows: > > sqlite3_create_collation16( > FDB.Handle, > 'USERNOCASE', > SQLITE_UTF16LE, > nil, > SQLite3_Compare_User_NoCase_UTF16LE); > >The database has the following pragmas: > > PRAGMA locking_mode=EXCLUSIVE > PRAGMA synchronous=OFF > PRAGMA journal_mode=OFF > PRAGMA cache_size=4000 _______________________________________________ Delphi Inspiration mailing list yunqa@xxxxxxxxxxxxx //www.freelists.org/list/yunqa