Quote:
Originally posted by Ad Dieleman
A few things you can check:
1) Open the Query Analyzer of SQL Server and check if you can update the table. If not, something's wrong with your permissions.
2) Open the recordset with cursortype adOpenDynamic. The default is adOpenForwardOnly which doesn't allow any changes on the recordset.
You'd need a statement like
'rstRes.Open CursorType:=adOpenDynamic'
3) I don't know if the recordset will be updateable when using a calculated column in the primary key. You can find this out by adding an identity field which you then use as a primary key and maintaining a unique index for your original primary key.
Ad Dieleman.
|
1) would not have been a permission thing.
2) yes
3) it's definitely the computed field in the key that's doing the locking - ADO is doing something in the background and is documented terribly (having said that I'm no
VB programmer)
But using an identity PK + the UNIQUE constraint DOES work. Thanks tons for making me rethink. No more bad data for me.