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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|