Hi,
i'm trying to insert some records into the table and i keep getting errors. the error that i get is:
Error Type:
Microsoft OLE DB Provider for SQL Server (0x80040E14)
Line 1: Incorrect syntax near '27'.
/agencyForm.asp, line 20
Here is the code that i can't quiet get to work:
<%
sub WriteRecord
'Creating the database connection
Dim Cn, strSQL, commandObject
Set Cn = Server.CreateObject("ADODB.Connection")
Cn.Open Application("Connection3_ConnectionString")
Set commandObject= Server.CreateObject("ADODB.Command")
Set commandObject.ActiveConnection = Cn
strSQL = "INSERT INTO application"
strSQL = strSQL + " VALUES("
strSQL = strSQL + "'" +"'"&Request.Form("ApplName")&"'"+ "'"
strSQL = strSQL + "'" + "'"&Session("Username")&"'" + "'"
strSQL = strSQL + ")"
commandObject.CommandText = strSQL
commandObject.Execute
end sub
if Request.Form.Count => 0 then
Call WriteRecord
end if
%>
Can somebody maybe send me an exmple of an insert statement that they used and that works.
Thanks