Hi Terry,

Hope this helps I have popped some cf code together and a dummy stored
procedure:

---------------------


<!--- *** COLDFUSION CODE: CALL THE STORED PROCEDURE AND PASS IN SOME
DATA*** ---->

<cfstoredproc procedure="sp_SomeStoredProcedureName"
datasource="YourDatabase">

 <cfprocparam value="21" <!--- this could be a dynamic variable --->
        type="In"
          cfsqltype="CF_SQL_INTEGER">

 <cfprocresult name = YourQueryName>

</cfstoredproc>

<!--- *** COLDFUSION CODE: OUTPUT DATA RETURNED FROM STORED PROCEDURE***
---->

<cfoutput query="YourQueryName">

#id#<br>

</cfoutput>

<!--- END COLDFUSION CODE --->



<!--- *** STORED PROCEDURE CODE: MAKE SURE YOU HAVE RUN THIS QUERY IN VIA
QUERY ANALYZER *** --->

CREATE procedure risp_InsertExAdminReportCategories


@id int

as

/*
PROCEDURE:    sp_SomeStoredProcedureName

VERSION HISTORY
Version Date  Who    Description
------- -----------------------
-----------------------------------------------
------------------------------------------------------------------------------------------

1.0 03 November 2006 Jose Diaz  Baseline version
------- -----------------------
------------------------------------------------
------------------------------------------------------------------------------------------

*/

SELECT *
FROM tblYourTableName
WHERE tblYourTableName.id = @id
ORDER BY iEventID, iExhibitorID


 <!--- *** END STORED PROCEDURE CODE DOES NOT GO IN THE CFM TEMPLATE ***
--->
--------------------

Thanks Jose Diaz


On 11/3/06, Terry Troxel <[EMAIL PROTECTED]> wrote:
>
> I would really appreciate it if someone could
> Show me a simple example of how to use cfstoreproc
> With a MSSQL stored procedure and then the code to
> Display the results of that.
>
> I have worked with Access for years and am relatively new
> To MSSQL and have never used that tag. We have a new
> software
> In-house that uses MSSQL and the company that wrote it
> utilizes
> Stored procedures a lot, so I need to get up to speed on
> using
> CF with it.
>
> Terry Troxel
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:259116
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to