Updating a counter (Full Version)

All Forums >> [Web Development] >> ASP and Database



Message


MikeF -> Updating a counter (2/27/2001 22:30:00)

I have a counter within my ACCESS 97 D.B. that I need to increment. The following code is not working:

SQLStmt = "UPDATE boards SET "
SQLStmt = SQLstmt & " number-of-posts='" & number-of-posts + 1 & "'"
SQLStmt = SQLStmt & " WHERE subject='" & Subject & "'"
SQLStmt = SQLStmt & " And msgboard='" & Msgboard & "'"

All help is appreciated!





Spooky -> RE: Updating a counter (2/28/2001 18:48:00)

Youll need to open the recordset first, get the value of number-of-posts (which should be numeric) and then add the new value

eg :

objRs(11)= objRs(11) + "1"





Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
3.076172E-02