deleted

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for SQLite
Post Reply
King555
Posts: 1
Joined: Sat 29 Feb 2020 17:25

deleted

Post by King555 » Sat 29 Feb 2020 17:46

deleted
Last edited by King555 on Fri 07 Oct 2022 10:12, edited 2 times in total.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: Typed dataset in Visual Studio/Visual Basic and AutoIncrement in SQlite database

Post by Shalex » Fri 06 Mar 2020 21:27

How can I easily reload only the id column after saving a row?
Run Tools > SQLite > DataSet Wizard, select your existing DataSet, press "Configure commands" on the "Setup individual data tables" step. Open the "Command Generator" tab, press "Get Table Fields".
* In the Options section, select "With refresh SQL" under "Generate insert command".
* In the grid with columns, select only "Key" and "Refreshing" checkboxes for the id column and only "Updating" for the department column.
After this, press "Generate Commands". Now the Insert command should be

Code: Select all

INSERT INTO main.departments (department) VALUES (:department);
SELECT id FROM main.departments WHERE id = :p1
Why do I have to set the DataTable to generate another ID?
Some value should be provided to the Not Null property of DataTable.

Post Reply