Home Forums SMARTMAIL Calendar eCards Help  Hot!!  NSW/ACT  QLD SA TAS VIC WA  NT

Copyright 2004 enviro.org.au

'Australia's free environment friendly real estate service for agents and owners'

All rights reserved. Revised: June 10, 2006 ~ <% Function DoSiteCount on error resume next 'Create DSN Less connection to Access Database 'Create dbconn Object Dim dbconnx ' ADO connection Dim rsx ' ADO recordset Dim strDBPathx ' path to our Access database (*.mdb) file strDBPathx = Server.MapPath("db\SiteCtr.mdb") Set dbconnx = Server.CreateObject("ADODB.Connection") dbconnx.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strDBPathx & ";" sqlstring = "SELECT * from ctr;" Set rsx = dbconnx.Execute(sqlstring) sqlstring = "UPDATE ctr SET zctr = " & rsx("zctr") + 1 & ";" response.write formatnumber(rsx("zctr"),0) Set rsx = dbconnx.Execute(sqlstring) dbconnx.close Set RSx = Nothing Set dbconnx = Nothing End Function DoSiteCount %>