Help please,
I'm putting together an online survey using ASP and I keep getting this error message. My code seems fine, but I'm new to ASP. I've pasted the error and the code below it. Please take a look at it and let me know if you have any ideas. I created the DSN without any problems and can connect to the db...?
Also, does anyone know any sites where I can find tips or code for ASP - SQL db surveys?
Your help is badly needed and greatly appreciated.
Tracey 27
My error:
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near the keyword 'Order'.
/demo_default.asp, line 26
My Code:
<% @EnableSessionState=False %>
<% Response.Buffer = true %>
<%
dim ticket
dim first_name
dim last_name
dim description
dim date_opened
dim date_closed
dim serviced_by
dim survey
dim clientname
survey = Request.QueryString ("survey_id"
Set Connection = Server.CreateObject("ADODB.Connection"
Connection.Open "DSN=Survey; UID=surveyuser; PWD=survey"
Connection.CommandTimeout = 60
SQLStmt = "Select surveyid,ticket#,client_id,client_name,convert(varchar(255),description)as description,date_opened,date_closed,serviced_by From Demo_Survey_tickets Where surveyid = " & survey & " Order By date_closed"
SQLStmt1 = "Select a.Question_ID,a.Question From Survey_Questions a Order By a.Question_id"
set RS = Connection.Execute (SQLStmt)
set RS1 = Connection.Execute (SQLStmt1) (this is LINE 27??)
questionid = RS1("question_id"
clientname = rs("client_name"
I'm putting together an online survey using ASP and I keep getting this error message. My code seems fine, but I'm new to ASP. I've pasted the error and the code below it. Please take a look at it and let me know if you have any ideas. I created the DSN without any problems and can connect to the db...?
Also, does anyone know any sites where I can find tips or code for ASP - SQL db surveys?
Your help is badly needed and greatly appreciated.
Tracey 27
My error:
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near the keyword 'Order'.
/demo_default.asp, line 26
My Code:
<% @EnableSessionState=False %>
<% Response.Buffer = true %>
<%
dim ticket
dim first_name
dim last_name
dim description
dim date_opened
dim date_closed
dim serviced_by
dim survey
dim clientname
survey = Request.QueryString ("survey_id"
Set Connection = Server.CreateObject("ADODB.Connection"
Connection.Open "DSN=Survey; UID=surveyuser; PWD=survey"
Connection.CommandTimeout = 60
SQLStmt = "Select surveyid,ticket#,client_id,client_name,convert(varchar(255),description)as description,date_opened,date_closed,serviced_by From Demo_Survey_tickets Where surveyid = " & survey & " Order By date_closed"
SQLStmt1 = "Select a.Question_ID,a.Question From Survey_Questions a Order By a.Question_id"
set RS = Connection.Execute (SQLStmt)
set RS1 = Connection.Execute (SQLStmt1) (this is LINE 27??)
questionid = RS1("question_id"
clientname = rs("client_name"