Hello All

I am new to vb.net i am stuck in a problem
I am using vb,net as front end and sql server as backend. I want to display all records in a datagrid. Inserting data to the datasource is successful but it is not refreshing in datagrid .
Please help me . how to bind that updated row to the datagrid.
This is my lines of code .
VB Code:
  1. Dim conn As New OleDbConnection("Provider=SQLOLEDB;user ID=sa;Password=dreams;DATABASE=mydb;server=localhost")
  2.  
  3.  
  4.             Dim sda As New OleDbDataAdapter()
  5.             Dim str As String
  6.             Dim ds As New DataSet()
  7.             str = "Select * from LessorDetails"
  8.             sda = New OleDbDataAdapter(str, conn)
  9.             sda.Fill(ds, "LessorDetails")
  10.             Dim dt As New DataTable()
  11.             dt = ds.Tables("LessorDetails")
  12.             ds = Nothing
  13.             Dim strqry As String
  14.             Dim adapter As New OleDbDataAdapter()
  15.             Dim dataset As New DataSet()
  16.  
  17.             strqry = "Insert into LessorDetails(LessorName) VALUES('" & txtLName.Text & "')"
  18.             adapter = New OleDbDataAdapter(strqry, conn)
  19.             adapter.Fill(dataset, "LessorDetails")
  20.  
  21.  
  22.             Dim cb As OleDbCommandBuilder = New OleDbCommandBuilder(adapter)
  23.  
  24.             adapter.Update(dt)
  25. dataGrid1.Datasource=dt


Thanks in advance


Regards