
error updating a recordset using an inner join - please help
Can any one help, I am trying to update two tables using an inner join.
Each time I changed my sql statement to not include the join the update
works fine, but i get the following error when I use the inner join sql
statement.
Error: Cannot Update. Database or object is read only.
The only thing that I can figure is since I am joining the contactid and
categoryid then searching for a contactid with a certain value, it then
returns the recordset back as read only. I am not sure can some one help.
If there is a better way of doing this please let me know. I am using an
access97 database and ADO 2.x.
Thanks in advance.
Jorge
sql = "Select tbl_mainlist.*,tbl_categories.* from " & _
"tbl_mainlist inner join tbl_categories on
tbl_mainlist.contactid " & _
"= tbl_categories.categoryid where tbl_mainlist.contactid=" &
_
frmContact.txt_ContactId.Text
' conn is an open connection already established
rsUpdate.Open sql, conn, adOpenDynamic, adLockOptimistic