Hi guys, can you pls help me what is the vb code in retrieving my data in the database? my code is this.
Dim SandLine As String SandLine = txt1S.Text & "," & txt2S.Text & "," & txt3S.Text _ & "," & txt4S.Text & "," & txt5S.Text & "," & txt6S.Text _ & "," & txt7S.Text & "," & txt8S.Text & "," & txt9S.Text _ & "," & txt10S.Text Dim ds As New DataSet Dim da As New OleDb.OleDbDataAdapter Dim sql As String Dim connectionstring As New OleDbConnection(MSAccessConnection.cnstr) connectionstring.Open() sql = "SELECT * FROM tblBatch" da = New OleDb.OleDbDataAdapter(sql, connectionstring) da.Fill(ds, "MyDatabase") connectionstring.Close() Dim cb As New OleDb.OleDbCommandBuilder(da) Dim dsnewrow As DataRow dsnewrow.Item("btchSand") = SandLine ds.Tables("MyDatabase").Rows.Add(dsnewrow) da.Update(ds, "MyDatabase")
As you can see, i manage to save the data in the database field by separating them with the comma. Can you please help me how can I retrieve my data in the textbox again from the database?
Edited by kruxena: n/a