Hello,
I wrote a script to count the number of records that each user has, not sure what I am doing wrong, because the script sometimes works and sometimes it does not.
Could it be a cache issue? if so how could I fix it?
here is the code I am using
I wrote a script to count the number of records that each user has, not sure what I am doing wrong, because the script sometimes works and sometimes it does not.
Could it be a cache issue? if so how could I fix it?
here is the code I am using
Code:
Username = Request.Form("txtUsername")
'Build connection with database
set conn = server.CreateObject ("ADODB.Connection")
conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & server.MapPath ("mydb.mdb")
set rs = server.CreateObject ("ADODB.Recordset")
rs.Open "SELECT count(*)as intTotal FROM mytable where username='" & Session("Username")& "'" , conn, 1
Response.Write rs("intTotal")