Got it.... whoo hoo ... now that is really very cool.  I like it.

-----Original Message-----
From: Paul Hastings [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 03, 2002 10:38 AM
To: CF-Talk
Subject: Re: Dynamic stored procs


> I am using <cfstoredproc> so I won't be 'execing' anything. I need to know

sure you can. though you might use sp_executeSQL as it will buy you
some caching & is a bit more flexible.

CREATE PROCEDURE junk @x int, @y varchar(100),@d datetime
AS
DECLARE @thisSQL nvarchar(500)
SET @thisSQL = N'SELECT * From Urls where urlID >= @xparam AND datesubm
itted
>  @dparam ORDER BY ' + @y
exec sp_executeSQL  @thisSQL, N'@xparam int, @dparam datetime', @x, @d

> would you convert a query like this to a stored procedure, and then how
> could you call it with <cfstoredproc>?

see above...


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.311 / Virus Database: 172 - Release Date: 12/27/2001
_________________________
_________________________
____________________
Why Share?
  Dedicated Win 2000 Server · PIII 800 / 256 MB RAM / 40 GB HD / 20 GB
MO/XFER
  Instant Activation · $99/Month · Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionc
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
______________________________________________________________________
Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation · $99/Month · Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona
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

Reply via email to