how do i remove selected row permanently from sql database through datagrid?
-
i am using vb.net 2003.i am doing my project in vb.net windows application. how do i remove selected row permanently from sql database through datagrid in vb.net windows form during runtime. for example, values are in datagrid like name age rollno city ramu 22 68 chennai rajesh 23 70 cbe kamal 21 52 salem arun 25 04 trichy here name,age,rollno,city are field name.now i want to remove selected row permanently from sql database through datagrid.In this datagrid,if i select "kamal" row(kamal,21,52,salem) means,that kamal row will remove permanently from sql database.how to do these.i want in vb.net windows application,not web application.plz help me.
-
i am using vb.net 2003.i am doing my project in vb.net windows application. how do i remove selected row permanently from sql database through datagrid in vb.net windows form during runtime. for example, values are in datagrid like name age rollno city ramu 22 68 chennai rajesh 23 70 cbe kamal 21 52 salem arun 25 04 trichy here name,age,rollno,city are field name.now i want to remove selected row permanently from sql database through datagrid.In this datagrid,if i select "kamal" row(kamal,21,52,salem) means,that kamal row will remove permanently from sql database.how to do these.i want in vb.net windows application,not web application.plz help me.
:omg: As far as I understood from problem, the simple answer is to fire a delete query on the database with where condition. Befroe that you can get the row items by trapping the cell clicked event. it will give you the row number and from its items list you can build the quesry. Hope this helps
-
i am using vb.net 2003.i am doing my project in vb.net windows application. how do i remove selected row permanently from sql database through datagrid in vb.net windows form during runtime. for example, values are in datagrid like name age rollno city ramu 22 68 chennai rajesh 23 70 cbe kamal 21 52 salem arun 25 04 trichy here name,age,rollno,city are field name.now i want to remove selected row permanently from sql database through datagrid.In this datagrid,if i select "kamal" row(kamal,21,52,salem) means,that kamal row will remove permanently from sql database.how to do these.i want in vb.net windows application,not web application.plz help me.
Hi my be I can imagine you database Schema !! assume that you have a table like this Table Name = Table1 Table Fields Name | Age | Home ---------------------------- stark | 25 | MyHome sonya | 21 | HerHome if you want to delete "stark , 25 , MyHome" then you have to write an Sql Query like this
Delete from Table1 Where Name = 'Stark' and Age = '25' And Home = 'MyHome'
P.S the best Schema for your table should be , like this ID | Name | Age | Home ---------------------------- 1 | stark | 25 | MyHome 2 | sonya | 21 | HerHome then your query will be like thisDelete from Table1 Where ID = '1'
hope this will help .... if my answer was going far from you Question .. Just let me know , I still have more ideas to help you Have Good dayI know nothing , I know nothing