hi all.
i have written part of a stored proceedure, it is very simple as its my first one, but not quite finished. the code in access will pass the 2 parameters to the stored proceedure, but im a bit stuck. take a look…..
ALTER PROCEDURE dbo.SetOption
(@Opkey nvarchar(20),
@OPSwitch bit)
AS SELECT OPKey, OPSwitch
FROM dbo.[System Options]
WHERE (OPKey LIKE @opkey) AND (OPSwitch LIKE @opswitch)
— is the switch set to true?
if (select count(*) from [system options]
WHERE (OPKey LIKE @opkey) AND (OPSwitch LIKE @opswitch)) >= 1
** if there is a record when this runs i would like to return something back to the access code so that i can set a switch, if there are no records i dont want to set a switch.
basically how do i finish this, and then what code do i need to run this from the adp and pass the parameters…and get a result back??
please help me im hopeless