Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error using crystal in Asp

Status
Not open for further replies.

moonknightt

Programmer
May 7, 2002
92
US
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 = &quot;P1&quot;
provider = &quot;MSDASQL&quot;
datasource = &quot;AccountingDB_Rollup&quot;
username = &quot;Itreporting&quot;
password = &quot;&quot;
databasetable = &quot;Proc(spRptWQAgingCreditorServicesSelect;1)&quot;
valuedatabasecolumn = &quot;OrgID&quot;

strConn = &quot;Provider=&quot; & provider & &quot;;Data Source=&quot; & datasource & &quot;;User ID=&quot; & username & &quot;;password=&quot; & password & &quot;;&quot;

query = &quot;SELECT DISTINCT &quot; & valuedatabasecolumn
query = query & &quot; FROM &quot; & databasetable
query = query & &quot; ORDER BY &quot; & valuedatabasecolumn & &quot; ASC&quot;

set conn = Server.CreateObject(&quot;ADODB.Connection&quot;)
conn.Open strconn
set rs = conn.Execute( query )

Response.Write(&quot;<SELECT SIZE=1 NAME=&quot; & chr(34) & parmid & chr(34) & &quot;>&quot; & chr(13) )
rs.movefirst
do while not rs.EOF
if rs(0) <> &quot;&quot; then
Response.Write( &quot;<OPTION VALUE=&quot; & chr(34) & rs(0) & chr(34) & &quot;>&quot; & rs(0) & chr(13) )
end if
rs.movenext
loop
Response.Write(&quot;</SELECT>&quot;)

rs.close
set rs = nothing
set conn = nothing
%>


What could be wrong with the syntax

 
it doesn't need a pass word.

When i pull data from a table it works

This stored proc pulls data from that table
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top