ADawn
asked on
Howto: Fill some textboxes using a dataset
I'm trying the fill some textboxes with data from a dataset - code below. It keeps telling that table 0 doesn't exist. Is there a better way to fill these textboxes than the way I'm going at it?
Dim MyConn As New Data.OleDb.OleDbConnection (gstr_Conn String)
strSQL = "Select * From tbl_Unit WHERE Unit_AutoID ='" & g_lng_AutoID & "';"
Dim DS_Details As New DataSet
Dim DA4 As New OleDb.OleDbDataAdapter(str SQL, MyConn)
Me.txtColors.Text = DS_Details.Tables(0).Rows( 0).Item("U nit_Color" )
Me.txtShapes.Text = DS_Details.Tables(0).Rows( 0).Item("U nit_Shape" )
MyConn.Close()
ADawn
Dim MyConn As New Data.OleDb.OleDbConnection
strSQL = "Select * From tbl_Unit WHERE Unit_AutoID ='" & g_lng_AutoID & "';"
Dim DS_Details As New DataSet
Dim DA4 As New OleDb.OleDbDataAdapter(str
Me.txtColors.Text = DS_Details.Tables(0).Rows(
Me.txtShapes.Text = DS_Details.Tables(0).Rows(
MyConn.Close()
ADawn
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.