CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 Execute StoredProcedure

Print topic Send  topic

Author Message
Karim
Posted: 09/23/2003, 8:45 PM

How do you execute a stored procedure in ccs2? e.g. execSP id,year Returninh a float.

Thanks,
Karim
arrowgance
Posted: 09/30/2003, 10:19 PM

not sure what you like but it could take a lot of situations

as i visualize a page i assume to add a label and name it theproc

id------------name----------date-------theproc
{id}----------{name}--------{date}-----{theproc}

------------------{page}----------------------

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
now i create a stored procedure

CREATE PROCEDURE sp_whoisstupid
(
@id int
@prcent decimal(10,2)
)
WITH RECOMPILE
AS

SELECT id,
CASE name
WHEN 'S' THEN 'Stupid'
WHEN 'N' THEN 'Normal'
END AS Name
FROM stupidtable
WHERE (id=@id)
AND (prcent=@prcent)
ORDER BY Name

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Now I add code to before show event to theproc label

dim SQL, thespparam, thedecimalorfloat, rs

thedecimalorfloat = 23.45

thespparam = yourformname.name.value & ", " & thedecimalorfloat

SQL = "sp_whoisstupid " & thespparam

SET RS = DBConnectionName.Execute(SQL)
yourformname.theproc.Value = RS(1) 'which is the name in your stored proc

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.