6
Answers

How to conditionally display a Yes/No message box...

Hi guys,

I need to display a message box conditionally, I hope you can help me. The situation is this, I have a data entry application and on my Save button, it checks first if the record exists in the database. If it doesn't, it creates a new record. And if does, I would need to display a Yes/No dialog box asking the using if the record is to be updated or not. I should be able to capture the users selection so that I can perform the update or not. This basically left me not consider adding an attribute to my button and I cant use ajax toolkit or jquery. Please help me guys... Thanks...
Answers (6)
0
Marcel Hertel

Marcel Hertel

NA 54 0 14y
hi,

assume that you have the columns emp_id and emp_name in your emp-table you can use the following procedure:

create procedure sp_Sortdata
(
    @Orderbyclause varchar(50)
)
as
select
    *
from
    emp e
order by   
    case when @Orderbyclause = 'emp_id' then e.emp_id end asc
    ,case when @Orderbyclause = 'emp_name' then e.emp_name end asc
   
if you execute exec sp_Sortdata 'emp_id' the procedure returns the emp-table ordered by emp_id

i hope this helps

Marcel Hertel