Morning all.
Quick question ....
When updating or adding records into a table via VB, if I were to use
rather thanCode:Sql = "update TABLEA set B = B + 1 where C = '1234'" connUpdate.Execute Sql
what are the benefits and/or pitfalls ?Code:Sql = "update TABLEA set B = B + 1 where C = '1234'" Set rsUpdate = New ADODB.Recordset cmdUpdate.CommandText = Sql: cmdUpdate.ActiveConnection = connUpdate rsUpdate.Open cmdUpdate, , adOpenDynamic, adLockPessimistic Set rsUpdate = Nothing
I realise that not defining a recordset for updates is neater, as its one less object to have to deal with, but how is locking handled in the first example ?
Is it just determined by the server ?
Apologies if all this sounds obvious, but I just don't know.




Reply With Quote