DropDownList and SQL question
-
Hi! I have 2 questions: 1. I have say 2 DropDownList boxes, when I select Product A from the first DropDownList Product A options appear in the second DropDownList and visa versa? 2. How would I write a SP in SQL to check if the value is already in the DB? For instance, if someone wants to add "jeff" then SQL must first check to see if jeff exists. If he exists then SQL must use that value and not add a second jeff. Thanks Guys and Gals! Illegal Operation Making Computer Software Talk
-
Hi! I have 2 questions: 1. I have say 2 DropDownList boxes, when I select Product A from the first DropDownList Product A options appear in the second DropDownList and visa versa? 2. How would I write a SP in SQL to check if the value is already in the DB? For instance, if someone wants to add "jeff" then SQL must first check to see if jeff exists. If he exists then SQL must use that value and not add a second jeff. Thanks Guys and Gals! Illegal Operation Making Computer Software Talk
hi I m not telling syntax just the approach 1)in first dropdownlist when u select a product , then retrieve the id of selected item & capture this event of item change . then in this event , retreive the options & populate the second combo 2) for sp create procedure test ( val in , existsval boolean out ) as select count(*) from [table] where value = val if @@rowcount = 0 then /* this value is not there in db */ existsval = false end if return look out for exact syntax of sp Divya Rathi