0

Hello everyone

I have a windows form application in Visual Studio 2012, with a datagridview. I need to save new data on this datagridview to a SQL database.

Could anyone help me with the code or a procedure.

The database name is PRISOON, and the table records to be added information are EXPORTWEB and EXPORT.

Here is the existing code:

Public Class StatusEncomendas

Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load

    'TODO: This line of code loads data into the 'PRISOONDataSet.CabecDoc' table. You can move, or remove it, as needed.
    Me.CabecDocTableAdapter.Fill(Me.PRISOONDataSet.CabecDoc)

End Sub

Private Sub CabecDocDataGridView_CellContentClick(sender As Object, e As DataGridViewCellEventArgs) Handles CabecDocDataGridView.CellContentClick

End Sub

Private Sub CabecDocBindingNavigatorSaveItem_Click(sender As Object, e As EventArgs)
    Me.Validate()
    Me.CabecDocBindingSource.EndEdit()
    Me.TableAdapterManager.UpdateAll(Me.PRISOONDataSet)
End Sub

Private Sub Button1_Click(sender As Object, e As EventArgs)
    Me.Update()

End Sub

End Class

Thank you very much

2
Contributors
1
Reply
11
Views
2 Years
Discussion Span
Last Post by OtepTheThird
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.