R
Rich
Hello,
I am having a problem showing data in a form textbox which
is bound to a column in a table in a dataset. I have
successfully established a connection to an Access mdb,
successfully created the oledbadapter and successfully
created the dataset object. The table in the mdb is
tbl1. I named tbl1 as dtTbl1 in the dataset object ds1
and a field called fld1 as dcfld1. I can loop through the
dataset and see my data in the console window. So on the
form load event I say this:
Private sub Form_Load(...)
ds1.Clear()
oledbda1.Fill(ds1, "tbl1")
Me.BindingContext(ds1, "tbl1").Position = 0
End Sub
For the textbox, txt1 I go to the properties to
DataBinding, select ds1, tbl1, dcfld1 and press enter. So
when the form loads, shouldn't the data from the first row
first column appear in txt1? I am not seeing anything.
Any suggestions appreciated on what else I need to do to
make the data appear in txt1 based on databinding.
Thanks,
Rich
I am having a problem showing data in a form textbox which
is bound to a column in a table in a dataset. I have
successfully established a connection to an Access mdb,
successfully created the oledbadapter and successfully
created the dataset object. The table in the mdb is
tbl1. I named tbl1 as dtTbl1 in the dataset object ds1
and a field called fld1 as dcfld1. I can loop through the
dataset and see my data in the console window. So on the
form load event I say this:
Private sub Form_Load(...)
ds1.Clear()
oledbda1.Fill(ds1, "tbl1")
Me.BindingContext(ds1, "tbl1").Position = 0
End Sub
For the textbox, txt1 I go to the properties to
DataBinding, select ds1, tbl1, dcfld1 and press enter. So
when the form loads, shouldn't the data from the first row
first column appear in txt1? I am not seeing anything.
Any suggestions appreciated on what else I need to do to
make the data appear in txt1 based on databinding.
Thanks,
Rich