calliepeck
03-09-2006, 09:46 PM
I'm getting this error, and I don't know why!:
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement.
/HIRC/adminfiles/update_hearings.asp, line 34
I miss php/mysql
<%
Dim sql, headline, title, m, d, y, thedate, thetime, fulltime, location, thetype, committee, committee2, info
title=request.Form("title")
head=request.Form("head")
thetime=request.Form("time")
am_pm=request.Form("am_pm")
fulltime=thetime&" "&am_pm
m=request.Form("mo")
d=request.Form("day")
y=request.Form("year")
thedate=m&"/"&d&"/"&y
thetype=request.Form("type")
committee=request.Form("headline")
committee2=request.Form("committee2")
info=request.Form("info")
sql="INSERT INTO hearings SET"_
&"title='title',"_
&"headline='head',"_
&"time='fulltime',"_
&"date='thedate',"_
&"location='location',"_
&"type='thetype',"_
&"committee='committee',"_
&"committee2='committee2',"_
&"info='info'"
Set con = Server.CreateObject("ADODB.Connection")
con.Open newsConn
' Executing the sql insertion code
con.Execute sql
' Done. Now Close the connection
con.Close
Set con = Nothing
%>
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement.
/HIRC/adminfiles/update_hearings.asp, line 34
I miss php/mysql
<%
Dim sql, headline, title, m, d, y, thedate, thetime, fulltime, location, thetype, committee, committee2, info
title=request.Form("title")
head=request.Form("head")
thetime=request.Form("time")
am_pm=request.Form("am_pm")
fulltime=thetime&" "&am_pm
m=request.Form("mo")
d=request.Form("day")
y=request.Form("year")
thedate=m&"/"&d&"/"&y
thetype=request.Form("type")
committee=request.Form("headline")
committee2=request.Form("committee2")
info=request.Form("info")
sql="INSERT INTO hearings SET"_
&"title='title',"_
&"headline='head',"_
&"time='fulltime',"_
&"date='thedate',"_
&"location='location',"_
&"type='thetype',"_
&"committee='committee',"_
&"committee2='committee2',"_
&"info='info'"
Set con = Server.CreateObject("ADODB.Connection")
con.Open newsConn
' Executing the sql insertion code
con.Execute sql
' Done. Now Close the connection
con.Close
Set con = Nothing
%>