SQL/MS Access Database : Update record with incremental view count.

  • Thread starter Thread starter Rob W
  • Start date Start date
R

Rob W

Greetings,

Even though Im working with JSP I connect to an MS Access Database, I want
to select a record and then after the select Update the field 'ViewCount' by
incrementing it by ONE each time the same record is retrieved via the SELECT
* TABLE statement.

To clarify I've done an example below, would this work?

UPDATE TABLE
SET = VIEWCOUNT = VIEWCOUNT + 1
WHERE ID = FORM.ID

Hope this makes sense
Rob W
 
yah looks great

but you need to do this instead


UPDATE TABLE
SET VIEWCOUNT = VIEWCOUNT + 1
WHERE ID = FORM.ID

I think that you had one too many equal signs in there earlier

-Aaron
 
Thanks for the feedback, will attempt it soon.
Everything is always that bit more difficult with JDBC (Java Database
Connections) where parameters are involved

(e-mail address removed)> wrote in message
yah looks great

but you need to do this instead


UPDATE TABLE
SET VIEWCOUNT = VIEWCOUNT + 1
WHERE ID = FORM.ID

I think that you had one too many equal signs in there earlier

-Aaron
 
Back
Top