if a stored procedure contains more than one statement(say, insert and select) and i want to execute only one statement from my front end....
create procedure myproc
@username varchar(),
@password varchar()
as
insert into mytable values(@username,@password)
select * from mytable
for example,
i've two buttons in my front end...1)insert 2)show
if i click insert button....the text box values should be inserted in to the table..i.e..only the insert statement in the sp should be executed
and when i click show button...only the select statement shld be executed..
i know this could be done by using 2 sp...
but the above is the question asked in cts
could any one pls help!!!!
urgent
thanks in advance