I have a table where the primary key consists of two columns. I'm doing this
because these two columns combined must be unique, while each column is not
unique on its own.

Because of the increased complexity of a dual-column primary key for some
operations, I'd like to use ROWID. But the documentation states the ROWID
can change at any time so I'm not sure what I can do safely.

The first operation I have in mind is to allow the user to edit a record
with the option of modifying one of the columns that make up the primary
key. The WHERE clause of my UPDATE statement would be far simpler if I could
use the ROWID instead of two keys where one could've changed. But hwat if
the ROWID has changed?

The second operation I have in mind is to populate a Windows listview
control with the contents of a table and store a unique ID in the DataItem
of each row in the control. But if I use the ROWID as this ID, how do I know
it will still be valid if I need to reference the row in the database.

Can anyone offer any advice here? Thanks!

-- 
View this message in context: 
http://www.nabble.com/Help-Using-RowID-tp19343483p19343483.html
Sent from the SQLite mailing list archive at Nabble.com.

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to