Hello everybody,
I am using following codes to insert the data to the database.but I am getting error please help me with this.
codes:
<%
Dt= Date()
Set T=Request.Form("trainer")
Set Co=Request.Form("course")
Set Ss=Request.Form("sessionstructure")
Set Sp=Request.Form("sessionpace")
Set Sc=Request.Form("sessioncontent")
Set Po=Request.Form("personalobj")
Set Pr=Request.Form("presentation")
Set I=Request.Form("Interaction")
Set Mn=Request.Form("manage")
Set Con=Request.Form("confedence")
Set Sr=Request.Form("sessionrate")
Set Sg=Request.Form("sessiongoal")
Set Cm=Request.Form("comment")
Set Nm=Request.Form("name")
Set Conn = Server.CreateObject("ADODB.Connection")
Set Rs = Server.CreateObject("ADODB.Recordset")
Conn.Open "PROVIDER=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" & Server.MapPath("Mypgdb.mdb")
sql= "Insert into StudentFB( Trainer, Course, Sessionstructure, Sessionpace, Sessioncontent, Personalobj, Presentation, Interaction, Manage, Confidence, Sessionrate, Sessiongoal, Comment, Name, Date) VALUES ('" & T & "',' " & Co & "','"& Ss & "','" & Sp & "','" & Sc & "','" & Po & "','" & Pr & "','" & I & "','" & Mn & "','" & Con & "','" & Sr & "','" & Sg & "','" & Cm & "','" & Nm & "', '" & Dt & "')"
Rs.Open sql, Conn
//Conn.Execute(sql)
Rs.AddNew
Rs.Update
Rs.Close
Set Rs = Nothing
conn.Close
Set Conn = Nothing
%>
I am getting the error:
Error Type:
Microsoft JET Database Engine (0x80040E14)
Syntax error in INSERT INTO statement.
/mpg/02.asp, line 50
Thanks