Tech Rocks

Coldfusion
Java
JQuery

An online resource for latest web technologies like Coldfusion, JRun, Pro*C, JQuery, HTML5, PHP, W3C, Java, J2EE, C, C++, ORACLE, PL/SQL, MySql, Ajax, Coldbox, Fusebox, UNIX, JavaScript, NodeJS and much more...

Wednesday, November 26, 2008

Stored Procedures

http://www.datafaucet.com/storedprocedure.cfm











... do something ...
... display the results ...

Here is the same stored procedure executed using the procedure object.


// get the datasource
ds = request.DataFaucet.getDatasource();
// get a procedure object
proc = ds.getProcedure().init(
procedure = "usp_ComplexProductSearch"
parameters = form,
results = "PopularProducts, RecentProducts, SearchResults",
maxrows = "10,10" // limit popular & recent to 10 records
);

// execute the procedure and return the results struct
q = proc.execute();


... do something ...


... display the results ...

0 comments :