Database edit error

Xojo version 2021 r2.1; MACOS 11.3.6
rs = RowSet

rs.EditRow statement issues the following error:
RecordSet is not editable because no primary key exists.

However, the rowset DOES have a primary key.

What do I look for to fix this?

TIA, Tony

What’s the schema for the table that says it has no primary key?

And what database?

sorry: SQLite database

Could we also see the schema? @Anthony_Marino

If the primary key column is rowid, you have to explicitly include that in your SELECT.

Otherwise, how is your primary key defined, and what is the SELECT that produces the RowSet?

1 Like

Thanks to all that assisted.

I tried all I could think of and the only solution that bypassed the error was
“select * from databasename”

I will research this further and produce the schema etc… As this was a “quick fix update”
the “*” option worked and the fix(es) done.

Again, thanks to all for the support


This indicates that Kem’s advice was the most relevant:

How were you getting the RowSet other than by doing a Select?

Was doing a select by specify the column names of only those columns that would be affected by the update