March 14, 2006 at 12:48 pm
Ado opens a cursor to the view ( rs2.open)
with Rs2!Flag=3 you try to update it via the cursor.
What are you trying to do (only viewing or also updating)?
March 15, 2006 at 12:04 am
Well,as I said I have a view [V2].This view contains the following fields:ArticleID,ArticleTitle,ArticleDate and Flag.I have a VB form and I have 2 commands on it,with the first commandI want to retrieve all the articles that have a Flag=1I wrote the following statement:Rs2.Open"Select* [V2] where Flag=1 order by ArticleDate"Upon clicking on the other command,I want to set the flag of the current record from 1 to 3.I tried this code:Rs2!Flag=3 but it didn't work.A message:[V2] CANNOT BE UPDATED.What's wrong with it?Thanks
March 15, 2006 at 6:00 am
The recordset has more than one parameter for the open-command.
By default it requests the data in read-only mode.
See
http://www.w3schools.com/ado/met_rs_open.asp
for the available parameters.
Rs2.Open"Select * from [V2] where Flag=1",,adOpenKeyset
Viewing 3 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply