Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VB Visual-Studio VB.NET
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.
 
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 30-Nov-12 20:04pm

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

  Permalink  

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



Advertise | Privacy | Mobile
Web03 | 2.8.141015.1 | Last Updated 1 Dec 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100