Hi Jeff,
I am testing this and I realiased that oRec object need to be created.
What is the object tat I need to create?
oRec = createobject(?...
>if using a table try this, some where on page on in an include file put this
>
>
>on error resume next
>sql="SELECT * FROM PAGECNT WHERE PAGEID='MHP00'"
>oRec.Open sql,oCon,adOpenDynamic,adLockPessimistic
>HitSince=cstr(oRec("Firstdate"))
>HitCount=cdbl(oRec("HitCount"))+1
>oRec("HitCount")=HitCount
>oRec("Lastdate")=cstr(date)
>oRec.Update
>oRec.Close
>If err.number<>0 then
> HitCount=0
> err.clear
>end if
>
>Table could look like
>
>PAGEID Character 12
>HITCOUNT Numeric 14
>FIRSTDATE Character 10
>LASTDATE Character 10
>
>
>If you felt you had to you could place in a sub and callit.
>HTH
>
>Jeff
>
>>This is nice. But how do you do that?
>>Question:
>>How do you create a function in ASP?
>>Where is located the funciton? ( Which page? )
>>Is there a functions of ASP that can do the sime thing? (counting hits)
>>Is there a site on the WEB with the documentation for all ASP functions?
>>
>>>>I am looking for an way of counting hits of a ASP page with some code in the ASP page.
>>>>
>>>>I know you can do this different ways, but what is the most simple?
>>>
>>>One approach would be to increment a value in a text file from your ASP code. So, you only store a value in a file. Than, you can call an ASP function to increment it.