Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

RS.Update will not update the field

Status
Not open for further replies.

nirajj

Programmer
Mar 12, 2003
103
US
Hi,

I have a rdo connection to the SQL server 2K DB.

The following code is used to update certain data in the table.

Set Rs = Connection.OpenResultset("Select * from Table, rdOpenDynamic, rdConcurRowVer)

Rs.Requery
Rs.Edit
Rs!fld1 = 'abc12345'
Rs!fld2 = 'abcdef'
Rs.Update

However, the data remains unchanged. There is no update in the table.

I am not too proficient with VB and do not know what exactly could be the problem. Any help would be highly appreciated.

Thanks :)


 
Your connection can't use the default adOpenForwardOnly and can't be opened in read-only mode (try Cursor type = adOpenKeyset, Lock Type = adLockOptimistic, Cursor location = adUseClient). I'm thinking you also need to .UpdateBatch at the end of your updates otherwise it doesn't get pushed to the database.

HtH,

Rob

-Focus on the solution to the problem, not the obstacles in the way.-
 
Hi Rob ...

thank you very much for the reply...

however i took the RS.Requery out (didnt know wt it was doing there exactly) and the program seems to be running good now ... :)

thank you
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top