Hi,
To increment no of replies , add these lines to your code
R1.Open "Select sum(no_of_reply) as reply_count from topmaster ", conn, adOpenStatic, adLockOptimistic, adCmdText
'Get total no replies
vnoofreply = R1("reply_count")
If isNull(vnoofreply) or noofReply ="" then
''''''''If this is the first reply set it to 1
vnoofReply=1
else
vnoofReply= vnoofReply +1
end if
''''''''Update table topmaster with the new value of noofReply
Sql = "Update topmaster set no_of_reply = " & vnoofreply &" where TopicId = " & vtopid &""
conn.execute(Sql)
but how can increament noofreply which is in table topmaster and reply is in table reply so what code have to use count reply based on topid and disply on page just like forum .