Page 1 of 1

deleted

Posted: Sat 29 Feb 2020 17:46
by King555
deleted

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

Posted: Fri 06 Mar 2020 21:27
by Shalex
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.