Click here to Skip to main content
12,628,919 members (31,719 online)
   

C#

 
Questionhow can i delete data from sql database on select the item from listbox in window form in asp.net Pin
Ranjeet69315-Oct-12 8:23
memberRanjeet69315-Oct-12 8:23 
private void button4_Click(object sender, EventArgs e)
{
mycon.con.Close();
mycon.adp = new SqlDataAdapter("delete from Inquiry_management where Inquiry_ID='" +listBox1.SelectedIndex + "'", mycon.con);
mycon.adp.Fill(ds, "Inquiry_management");
mycon.con.Open();

mycon.con.Close();

listBox1.Update();
MessageBox.Show("Row Deleted");

}
AnswerRe: how can i delete data from sql database on select the item from listbox in window form in asp.net Pin
kamalkss5-Oct-12 9:00
memberkamalkss5-Oct-12 9:00 
GeneralRe: how can i delete data from sql database on select the item from listbox in window form in asp.net Pin
Ranjeet69315-Oct-12 9:15
memberRanjeet69315-Oct-12 9:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web01 | 2.8.161205.3 | Last Updated 6 Dec 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid