S
shank
Can anyone see anything wrong with this INSERT code? It doesn't INSERT and I
get the following error when I try to submit data...
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC SQL Server Driver][SQL Server]The name 'Sammy' is not
permitted in this context. Only constants, expressions, or variables allowed
here. Column names are not permitted.
Line 20
I was using the name Sammy in the fname form field.
<%
varFname = Request("fname")
varEmail = Request("email")
varCountry = Request("country")
varOrderno = Request("orderno")
varPrice = Request("price")
varComments = Request("comments")
%>
<%
Dim DataConn, SQL
Set DataConn = Server.CreateObject("ADODB.Connection")
DataConn.Open SQL_STRING
SQL = "INSERT INTO IntCC ([Fname], , [Country], [OrderNo], [Price],
[Comments]) "
SQL = SQL & "VALUES (" & varFname & ", " & varEmail & ", " & varCountry & ",
" & varOrderno & ", " & varPrice & ", " & varComments & ") "
DataConn.Execute(SQL) <-- This is Line 20
%>
get the following error when I try to submit data...
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC SQL Server Driver][SQL Server]The name 'Sammy' is not
permitted in this context. Only constants, expressions, or variables allowed
here. Column names are not permitted.
Line 20
I was using the name Sammy in the fname form field.
<%
varFname = Request("fname")
varEmail = Request("email")
varCountry = Request("country")
varOrderno = Request("orderno")
varPrice = Request("price")
varComments = Request("comments")
%>
<%
Dim DataConn, SQL
Set DataConn = Server.CreateObject("ADODB.Connection")
DataConn.Open SQL_STRING
SQL = "INSERT INTO IntCC ([Fname], , [Country], [OrderNo], [Price],
[Comments]) "
SQL = SQL & "VALUES (" & varFname & ", " & varEmail & ", " & varCountry & ",
" & varOrderno & ", " & varPrice & ", " & varComments & ") "
DataConn.Execute(SQL) <-- This is Line 20
%>