Hi,
I have the follwoing code
how do i make it populate the data into my text fields with the data?vb Code:
Dim Conn As New OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=" & DBPath & ";") Dim Comm As System.Data.OleDb.OleDbCommand Dim sqlcom As String If Me.cmb_client.Text <> "" Then sqlcom = "Select * from tbl_client where client_id = " & Me.cmb_client.SelectedValue MessageBox.Show(sqlcom) Comm = New System.Data.OleDb.OleDbCommand(sqlcom, Conn) 'defines new data adapter Dim DA As New System.Data.OleDb.OleDbDataAdapter DA.SelectCommand = Comm ' defines new dataset Dim DS As New DataSet Try DA.Fill(DS) Catch ex As Exception 'The user may have entered a string as their login id MessageBox.Show(Err.Description) Me.Close() Exit Sub End Try Comm.Dispose() DA.Dispose() Conn.Close() Conn.Dispose() Else End If




Reply With Quote