Hi,
I am trying to create a simple ASP web counter for my site, but seem
to have an error somewhere ???
I am connecting to a MySQL server (works fine)
hit-marker = Varchar
hit_date = Date
hit-browser = Varchar
<%
marker = 1
browser = Request.ServerVariables("http_user_agent")
hitdate = date()
yy = Year(hitdate)
mm = Month(hitdate)
dd = Day(hitdate)
S_date = yy & "/" & mm & "/" & dd
Set adoDataConn = Server.CreateObject("ADODB.Connection")
adoDataConn.Open conn_string
uSQL = "INSERT INTO Webwiz (hit-marker, hit_date, hit-browser) VALUES
('" & marker & "'," & S_date & ",'" & browser & "');"
set RS = adoDataConn.Execute(uSQL)
%>
I keep getting the following error:
----------------------------------------------------------------
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[MySQL][ODBC 3.51 Driver][mysqld-4.1.22-standard]You have an error in
your SQL syntax; check the manual that corresponds to your MySQL
server version for the right syntax to use near '-marker, hit_date,
hit-browser) VALUES ('1',2007/6/5,'Mozilla/5.0 (Windows; U; W' at line
1
/hitwise.asp, line 20
________________________________________
What am I doing wrong ?
Any advise would be a great help :-)
Thanks in advance
David