How to you return a result from an SQL delete command? I just need to know if anything was deleted.
Thanks! At 01:28 PM 05/10/01 -0500, you wrote: >Another option would be to add the procparams, in the correct order and set >null="yes" in the procparam > >Another option would be to change the stored procedure itself to have the >ones you don't want to pass as the last declarations, and just don't include >the procparams for those > >-----Original Message----- >From: Andy Ewings [mailto:[EMAIL PROTECTED]] >Sent: Friday, October 05, 2001 12:12 PM >To: CF-Talk >Subject: RE: Problem with Stored Procedure > > >No you need the @. > >Th problem is with ColdFusion. IT is a nightmare when passing in proc >params. you unfortunately nedd to specify them all, and in the correct >order. I don't know why it asks for the dbvarname fattribute as it doen't >appear to use it. You have 2 options - either pass in the other params >using the default as the value or uses cfquery and execute the sp using >TRANSACT SQL i.e: > >EXEC spGetManagers @Orderby="Last", @ErrorStatus OUT etc....... > >------------------------------------------------------------------ >Andrew Ewings >Project Manager >Thoughtbubble Ltd >http://www.thoughtbubble.net >------------------------------------------------------------------ >United Kingdom >http://www.thoughtbubble.co.uk/ >Tel: +44 (0) 20 7387 8890 >------------------------------------------------------------------ >New Zealand >http://www.thoughtbubble.co.nz/ >Tel: +64 (0) 9 488 9131 >------------------------------------------------------------------ >The information in this email and in any attachments is confidential and >intended solely for the attention and use of the named addressee(s). Any >views or opinions presented are solely those of the author and do not >necessarily represent those of Thoughtbubble. This information may be >subject to legal, professional or other privilege and further distribution >of it is strictly prohibited without our authority. If you are not the >intended recipient, you are not authorised to disclose, copy, distribute, or >retain this message. Please notify us on +44 (0)207 387 8890. > > > >-----Original Message----- >From: Jared Stark [mailto:[EMAIL PROTECTED]] >Sent: 05 October 2001 17:36 >To: CF-Talk >Subject: Re: Problem with Stored Procedure > > >That is how I had it originally, but in the ColdFusion documentation it >shows it with the @. > >Jared >----- Original Message ----- >From: <[EMAIL PROTECTED]> >To: "CF-Talk" <[EMAIL PROTECTED]> >Sent: Friday, October 05, 2001 6:13 AM >Subject: RE: Problem with Stored Procedure > > > > I think you need > > DBVARNAME="Orderby" > > instead of > > DBVARNAME="@Orderby" > > > > This might be helpful: > > http://www.defusion.com/articles/index.cfm?ArticleID=56 > > > > > -----Original Message----- > > > From: Jared Stark [mailto:[EMAIL PROTECTED]] > > > Sent: Thursday, October 04, 2001 5:54 PM > > > To: CF-Talk > > > Subject: Problem with Stored Procedure > > > > > > > > > -- Here is code snippet for my stored procedure: > > > > > > CREATE PROCEDURE spGetManagers > > > @OrderBy nvarchar(20) = 'LAST', > > > @OrderType nvarchar(10) = 'ASC', > > > @Id int = -1, > > > @ErrorStatus int OUTPUT, > > > @ErrorMsg nvarchar(255) OUTPUT > > > AS > > > ... > > > > > > -- Here is CF Code calling the stored procedure: > > > > > > <cfstoredproc datasource="#request.dsn#" username="#request.user#" > > > password="#request.pass#" procedure="spGetManagers"> > > > > > > <cfprocparam dbvarname="@Orderby" type="IN" value="LAST" > > > cfsqltype="CF_SQL_VARCHAR"> > > > <cfprocparam dbvarname="@ErrorStatus" type="OUT" > > > variable="ErrorStatus" > > > cfsqltype="CF_SQL_INTEGER"> > > > <cfprocparam dbvarname="@ErrorMsg" type="OUT" variable="ErrorMsg" > > > cfsqltype="CF_SQL_VARCHAR"> > > > <cfprocresult name="manager" resultset="1"> > > > > > > </cfstoredproc> > > > > > > You'll notice that I'm not providing parameters for > > > @OrderType, nor @Id as > > > they have default values defined in the sp. > > > > > > -- Here is the error message I am getting: > > > > > > [Microsoft][ODBC SQL Server Driver][SQL Server]Formal > > > parameter '@OrderType' > > > was defined as OUTPUT but the actual parameter not declared OUTPUT. > > > > > > It would appear that it is trying to map my second > > > <cfprocparam> to the > > > @OrderType parameter, rather than using Named Notation and > > > mapping it to > > > @ErrorStatus. My understanding is that by using the > > > dbvarname attribute it > > > would pass to the correct parameter and I wouldn't need to provide a > > > <cfprocparam> tag for ALL parameters. > > > > > > 1. Is there something stupid here that I'm missing? > > > 2. Has anyone else had this problem? > > > 3. Should I call it a day, and go home? (yes) > > > > > > Thanks for any help... > > > Jared > > > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists