Home
Options

use SQLite with INDEX as primary key?

Hello

I have a SQLite database here, which I have integrated.
I can make queries with it, but an update of the data fails because a primary key is missing in the tables.
This is also written in the linqpad for each table.

Now I have seen in the DB Browser that there is a primary key index for each table. But I don't see them in Linqpad and I don't know how to include them.
Here is an example of an index:
CREATE UNIQUE INDEX PrimaryKeyElement ON Element (ELEMENT_ID,VARIANT_ID)
The table Element then looks like this:
CREATE TABLE Element ( Element_ID INTEGER NOT NULL, Variant_ID INTEGER NOT NULL, Flag_Variant SMALLINT, Type CHAR(50), Flag_Input INTEGER)

Is there a way to teach Linq to use the index as a primary key so that I can update values in the element table?

Thanks
Steffen

Comments

Sign In or Register to comment.