Following is my code to update a RecordSet, but it gives error that updating of recordset is not supported.... Any insight into this.... Function Main() dim countr dim RS set RS = CreateObject("ADODB.Recordset") set RS = DTSGlobalVariables("TableNames").value RS.MoveFirst for countr = 1 to RS.RecordCount msgbox RS.Fields("name").value RS("CompanionRecCount") = 0 RS("CentralRecCount")= 0 RS.Update RS.MoveNext Next Main = DTSTaskExecResult_Success End Function Deepak Khattar DBA World Health Organisation Geneva, Switzerland
What is the exact error while executing the script? Ensure necessary privileges are assigned to the login that executes the DTS package. Satya SKJ Moderator http://www.SQL-Server-Performance.Com/forum This posting is provided “AS IS†with no rights for the sake of knowledge sharing.
Prob this error might have happn'd due to the RS.Movefirst line. This is bcos, the RS is Forward Only and Read-Only in VBScript... To overcome this u can try issuing "UPDATE" Query. Check it... Seenu.