[RESOLVED] [2005] Refreshing Datas in DataGridView
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()
Re: [2005] Refreshing Datas in DataGridView
Oh oke it resolved! Thx, Yigit.
Re: [2005] Refreshing Datas in DataGridView
Please mark your thread resolved if you don't need help.
Re: [2005] Refreshing Datas in DataGridView
Re: [2005] Refreshing Datas in DataGridView
Quote:
Originally Posted by YGTMLT
Resolved
You have to use the Thread Tools menu so it shows in the forum thread listing.
Re: [RESOLVED] [2005] Refreshing Datas in DataGridView