Hi,
I've 1 TextBox, 1 Button and 1 DataGridView (Access DB) on a same one form. When pressing a Button I'm inserting TextBox datas to Access Database. But, I want to refreshing DataGridView table same time to show a new data. I can't do it![]()
Thank you,
Yigit.
My code is like this;
Code:Dim cn As OleDbConnection Dim cmd As OleDbCommand Dim str As String cn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=E:\Data.mdb;Persist Security Info=True;Jet OLEDB:Database Password=123") cn.Open() str = "INSERT INTO Table1(Name) values('" & TextBox1.Text & "')" cmd = New OleDbCommand(str, cn) cmd.ExecuteNonQuery() cn.Close()




Reply With Quote