moonknightt
Programmer
IF anyone could help,
I get this message when trying to run crystal through Asp.
The asp is supposed to be calling a stored procedure.
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near the keyword 'Proc'.
/IntranetDev_PAR/Apps/Reports/WorkQueue/WorkItemsAging/WQAgingCreditorServices-parameters.asp, line 38
When i look through the asp code on line 38 this is what it gives
<%@ Language=VBScript %>
<%
parmid = "P1"
provider = "MSDASQL"
datasource = "AccountingDB_Rollup"
username = "Itreporting"
password = ""
databasetable = "Proc(spRptWQAgingCreditorServicesSelect;1)"
valuedatabasecolumn = "OrgID"
strConn = "Provider=" & provider & ";Data Source=" & datasource & ";User ID=" & username & ";password=" & password & ";"
query = "SELECT DISTINCT " & valuedatabasecolumn
query = query & " FROM " & databasetable
query = query & " ORDER BY " & valuedatabasecolumn & " ASC"
set conn = Server.CreateObject("ADODB.Connection"
conn.Open strconn
set rs = conn.Execute( query )
Response.Write("<SELECT SIZE=1 NAME=" & chr(34) & parmid & chr(34) & ">" & chr(13) )
rs.movefirst
do while not rs.EOF
if rs(0) <> "" then
Response.Write( "<OPTION VALUE=" & chr(34) & rs(0) & chr(34) & ">" & rs(0) & chr(13) )
end if
rs.movenext
loop
Response.Write("</SELECT>"
rs.close
set rs = nothing
set conn = nothing
%>
What could be wrong with the syntax
I get this message when trying to run crystal through Asp.
The asp is supposed to be calling a stored procedure.
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near the keyword 'Proc'.
/IntranetDev_PAR/Apps/Reports/WorkQueue/WorkItemsAging/WQAgingCreditorServices-parameters.asp, line 38
When i look through the asp code on line 38 this is what it gives
<%@ Language=VBScript %>
<%
parmid = "P1"
provider = "MSDASQL"
datasource = "AccountingDB_Rollup"
username = "Itreporting"
password = ""
databasetable = "Proc(spRptWQAgingCreditorServicesSelect;1)"
valuedatabasecolumn = "OrgID"
strConn = "Provider=" & provider & ";Data Source=" & datasource & ";User ID=" & username & ";password=" & password & ";"
query = "SELECT DISTINCT " & valuedatabasecolumn
query = query & " FROM " & databasetable
query = query & " ORDER BY " & valuedatabasecolumn & " ASC"
set conn = Server.CreateObject("ADODB.Connection"
conn.Open strconn
set rs = conn.Execute( query )
Response.Write("<SELECT SIZE=1 NAME=" & chr(34) & parmid & chr(34) & ">" & chr(13) )
rs.movefirst
do while not rs.EOF
if rs(0) <> "" then
Response.Write( "<OPTION VALUE=" & chr(34) & rs(0) & chr(34) & ">" & rs(0) & chr(13) )
end if
rs.movenext
loop
Response.Write("</SELECT>"
rs.close
set rs = nothing
set conn = nothing
%>
What could be wrong with the syntax