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

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
 
A

aaron.kempf

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
 
R

Rob W

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

[email protected]> 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
 
Top