Skip to content

Sqlite-net newbie, always Index was out of range ? #786

Open
@senyung

Description

@senyung

hi, Im new using sqllite-net, always got error Index was out of range, something is not clean ?

here my example:

            string dbPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Personal), "TestDB");
            SQLiteConnection dbTest = new SQLiteConnection(dbPath);
            dbTest.CreateTable<TestTable>();

            dbTest.Insert(new TestTable() { TestField = @"ABC\123", }); //<--**ALWAYS ERROR HERE ON SECOND RUN**

Step :

  1. Run F5 for firstime is ok
  2. Close the apps
  3. Run F5 Second time got error :

Unhandled Exception:

System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

Any help will be appreciated
TIA
Sen

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions