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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cant get it to update a number in db ...

Status
Not open for further replies.

snowboardr

Programmer
Feb 22, 2002
1,401
PH
It wont update my counter for some reason...I don't get an error, and the number currently in the db for the counter is 1, but it just wont update. I don't get an error either..it does redirect.

<%
StrSQL = &quot;SELECT * FROM bdirect WHERE id=&quot; & strID &
rs = my_conn.Execute (StrSQL)
strLink = rs(&quot;link&quot;)
strCount = rs(&quot;counter&quot;)

strSQL = &quot;UPDATE bdirect SET counter='&quot; & strCounter + 1 & &quot;' WHERE id='&quot; & strID & &quot;'&quot;

Set rs = my_conn.execute(strSql)

Response.Redirect(strLink) 'takes you to the page...

%>
 
OK ITS NOT WORKING. even with the

strSql = &quot;UPDATE bdirect SET counter='&quot; & strCount + 1 & &quot;' WHERE id=&quot; & strID
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top