Click here to Skip to main content
15,922,145 members

Comments by Kaveen Abeywansa (Top 2 by date)

Kaveen Abeywansa 11-Sep-13 10:47am View    
Well Then, Just use a variable.
int x = (your ID ex 10,9,etc * this is not a part of the code)
String query = ("delete from tablename where ID="+x,conn)
You can use a textbox to allow the user to enter the Id. If your textbox is named as textBox1,
int x = int.parse(textbox1.text);
sqlconnection conn = new sqlconnection(Connection string);
sqlcommand cmd = new sqlcommand("delete from tablename where ID="+x,conn);
**And the rest
** I used SQL as an example, but you can use another type if you want
Kaveen Abeywansa 11-Sep-13 10:23am View    
I am using the option available which will bind the data. I have coded for it. I used the arrow on the combobox to do so.