Click here to Skip to main content
15,886,799 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear Coders,

I Managed to fetch data from the database to the datagridview or even the textboxes by executing Query but when i used to modify or edit it it is not not actually working. I Used the Save button in the binding Navigator to save the changes. But Its not working. Please Help me out on this.

Here is the code.

VB
Dim con As New SqlConnection
Dim myconstring As String = "Data Source=ETA-TESTSRVR;Initial Catalog=Procurement;Integrated Security=True"
con.ConnectionString = myconstring
Dim da As New SqlDataAdapter("SELECT * from E1 where mat_sub_no ='" + ComboBox1.SelectedValue + "'", con)
Dim dt As New DataTable
da.Fill(dt)
DataGridView1.DataSource = dt.DefaultView
Posted

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900