This is what I use all the time for my procs and I've never had a Problem -
as long as the inputs match up - you should be ok - and as you're only
passing in a single input - I don't see why this won't work
<cfstoredproc procedure="qry_autotags3"
datasource="#application.ivrdsnsearch#">
<cfprocparam type="In" cfsqltype="CF_SQL_CHAR"
dbvarname="@PINNumber" value="#attributes.PIN#" null="No">
<cfprocresult name="qry_autotags" resultset="1">
</cfstoredproc>
Your Return(0) statement will exit the proc -
If the above doesn't work - try it w/o your return statement - perhaps it's
getting confused at that point
Since you're not specifying the 'returncode' in your cfstoredproc for that
value - I may leave your return statement out of the proc.
Kevin
www.hotgigs.com
-----Original Message-----
From: G L [mailto:[EMAIL PROTECTED]
Sent: Friday, May 20, 2005 10:07 AM
To: CF-Talk
Subject: Re: CFPROCPARAM Help Needed
DBVarName doesn't sound right either then, because I'm not trying to
match anything in the database. Just trying to pass a variable which
is declared in the sp. The variable I declare doesn't have to be the
same as any column name in the db.
Here's the sp:
CREATE PROCEDURE dbo.qry_autotags3
(@PINNumber char(11))
AS
BEGIN
SET NOCOUNT ON
SELECT *
FROM DMVRenewals (NOLOCK)
WHERE PINNumber = @PINNumber
ORDER BY ExpDate desc
RETURN(0)
END
GO
On 5/20/05, Kevin Penny <[EMAIL PROTECTED]> wrote:
> Use 'variable' only when you want to reference a value that is returned
from
> the query - from your sql server through an out/INOUT specificatoin (for
> this case you won't need it at all)
>
> Use dbvarname when you wish to match up the database variable with the
value
> you are passing in - sort of like a name/value pair @xyz = #url.xyz# etc.
>
> As it is cf5 - you can ignore the depreciation comments -
>
> Can you give us your 'create procedure' sql up to your begin statement?
> That would help
>
> Kevin Penny
> HotGigs.com
>
>
> -----Original Message-----
> From: G L [mailto:[EMAIL PROTECTED]
> Sent: Friday, May 20, 2005 9:33 AM
> To: CF-Talk
> Subject: RE: CFPROCPARAM Help Needed
>
> Oh, I didn't mention it's CF5. I don't really understand what the
> "dbvarname" or "variable" parameters mean, can anyone explain? I just need
> to pass a simple string var to the proc which does a search.
>
> >> Hi, I have an SP that I want to call correctly. I can simply do:
> >
> >Does your stored procedure have any other parameters before @PINNumber?
If
> >so, you'll need to add CFPROCPARAM tags for them before your existing
> >CFPROCPARAM tag. CFMX uses positional notation for stored procedure
> >parameters.
> >
> >Dave Watts, CTO, Fig Leaf Software
> >http://www.figleaf.com/
> >
> >Fig Leaf Software provides the highest caliber vendor-authorized
> >instruction at our training centers in Washington DC, Atlanta,
> >Chicago, Baltimore, Northern Virginia, or on-site at your location.
> >Visit http://training.figleaf.com/ for more information!
>
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking
application. Start tracking and documenting hours spent on a project or with a
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:207277
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54