problem in making counter ??
peace be with you
i try to make counter by this code :::
Code:
dim add_count,add_rst,nu_vi,nu_vi_add
set add_rst = server.createobject("adodb.recordset")
add_rst.open "select * from vi_con where count_id=1",db
nu_vi=add_rst("vc")
nu_vi_add=nu_vi+1
add_count="update vi_con set vc='"+nu_vi_add+"' where count_id=1"
db.execute (add_count)
i am open the recodset and after that add " 1 " to the value of the index " 1 " and then execute this add to the db
but there is error :
Code:
Error Type:
Microsoft VBScript runtime (0x800A000D)
Type mismatch: '[string: "update vi_con set vc"]'
/islam/main.asp, line 15
error in the update statment !!!
what's wronge
Re: problem in making counter ??
If vc is a numeric field, remove the single quotes from around it.