Hi, I'd like to update one field in a recordset but I'm getting this error:
*** insufficient key column information for updating or refreshing" ***
My program consists in a .VBS file (VbScript), and the code goes as follows:
connectionString = "Provider=SQLNCLI; DataSource=dbABC;Initial Catalog=whateverCat;Integrated Security=SSPI"
set objConn = CreateObject( "ADODB.Connection" )
set objRs = CreateObject( "ADODB.RecordSet" ) objConn.ConnectionTimeout = 0
objRS.CommandTimeout = 0
objRS.CursorLocation = 3 ' adUseClient
objRs.LockType = 3 ' adLockOptimistic
objRs.CursorType = 2 'adOpenDynamic
objRs.Open "Select ComputerID, ComputerName From ComputerTable", objConn
do until objRs.eof
objRs( "ComputerName" ).Value = "NewComputerName"
objRs.Update ' ****Fails here
I don't need that the changes made in the RecordSet to be propagated into the DB table, so perhaps here is my problem: I do only have read access to the tables. Could this be the problem? Thanks.
View Complete Post