#39 Value AUTOINCREMENT

open
nobody
None
5
2005-06-16
2005-06-16
Anonymous
No

I'm Italian and I don't speak very well English, but I
try it.
I have one problem with my application when I create a
table
Dim cmd As New SQLiteCommand
cmd = myDb.CreateCommand
cmd.CommandText = "CREATE table fornitori
(fornid integer primary key AUTOINCREMENT, nome
varchar(20), cognome varchar(20))"
cmd.ExecuteNonQuery()
the error is:
Eccezione non gestita di tipo
"Finisar.SQLite.SQLiteException" in sqlite.net.dll

Informazioni aggiuntive: SQL logic error or missing
database: near "AUTOINCREMENT": syntax error

http://www.sqlite.org/lang_createtable.html, in this
page the autoincrement values is used

please help me, I need the value AUTOINCREMENT

excusme for my English ...
Thanks for your work and the dll !! You are the best !!

Discussion

  • Chrs Hall
    Chrs Hall
    2005-07-05

    Logged In: YES
    user_id=1291253

    I have also come across this problem when attempting to use
    an embedded resource script file and submitting the entire
    script to as the command text. Works fine without the auto
    increment but fails as described if AUTOINCREMENT is
    included in the column defs.
    The script works perfectly with AUTOINCREMENT if read into
    sqlite3.exe from the command line.

     
  • Robert Foster
    Robert Foster
    2005-08-22

    Logged In: YES
    user_id=526041

    Please check the version of the DLL that you are using. The
    version that ships with SQLite.Net may not support the
    AUTOINCREMENT keyword, you can drop in a replacement
    directly from the SQLite website.

     
  • Logged In: NO

    Ciao!

    per quel che ne so io Sqlite nella versione 2 non supporta
    l'autoincrement.

    La versione 2 della libreria viene utilizzare di defaul dal
    wrapper ADO NET, per cui se vuoi utilizzare la Versione 3 lo
    devi specificare.

    Ciao,
    /dave

     
  • Mayank Johri
    Mayank Johri
    2006-06-01

    Logged In: YES
    user_id=1189222

    Thanks robertjf,

    After updating the sqlite3.dll file the AUTOINCREMENT Syntax
    error has not been reported in my project.

    I have been using your SQLite.NET.dll dll file in my project
    http://mayadeploy.sourceforge.net.

    Again thanks for providing the SQLite.NET.dll. I really
    appreciate your work.

    Thanks and Regards,
    Mayank Johri