you are declaring your parameter as an internak variable in the SP rather
than a input parameter.  What you want in the SP is this...

CREATE PROCEDURE <procedure name> 
        
        @theaddr as varchar(48)

AS

BEGIN
        SELECT * FROM master where addr like '%@theaddr%'
END

------------------------------------------------------------------
Andrew Ewings
Project Manager
Thoughtbubble Ltd
------------------------------------------------------------------


-----Original Message-----
From: Steve Weiner [mailto:[EMAIL PROTECTED]]
Sent: 11 September 2000 18:14
To: '[EMAIL PROTECTED]'
Subject: Stored Procedures


Can anyone give me a clue here?  I've just started working with SQL 7.0 and
stored procedures.

My stored procedure code is as follows:

declare @theaddr varchar(48)
select * from master where addr like '%@theaddr%'


My cold fusion code is as follows:

<cfstoredproc procedure="test1" datasource="test" returncode="Yes">
        <cfprocparam type="In"
             cfsqltype="CF_SQL_CHAR"
             dbvarname="@testaddr"
             value="#form.addr">
        <cfprocresult name="checkmaster">
</cfstoredproc>


My error is as follows:

ODBC Error Code = 37000 (Syntax error or access violation)


[Microsoft][ODBC SQL Server Driver][SQL Server]Procedure test1 has no
parameters and arguments were supplied.

----------------------------------------------
Can anyone point me in what I am doing wrong?

Thanks,
[EMAIL PROTECTED]
----------------------------------------------------------------------------
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to