R
Rich
Hello,
I have successfully created an oledbconnection (oleconn)
to an Access mdb file along with an oleaDBdapter (oleda)
and a dataset (ds1). If I loop through the dataset
For i = 1 to 10
For Each col in ds1.Tables(0).Columns...
Console.Write col....(0,i), ...(1,i)...(2,i)
Next
next
I get data for the whole table. I defined the table name
from Access (tbl1) as dtTbl1, and each of 3 fields (fld1,
fld2, fld3) as dcfld1, dcfld2, dcfld3 in the dataset
object. Now I have 3 textboxes on a form, txt1, txt2,
txt3. When I bind these controls to the dataset I see ds1
in the Databindings Property. When I expand ds1 I see
tbl1 (not dtTbl1) and then when I expand tbl1 I see
fld1... (and not dcfld1...). So I select fld1 and press
Enter and for txt2, txt3. (Note: I do see dtTbl1 in the
Databindings property just below ds1. I tried selecting
that and the fields dcfld1..., but that did not yield
anything either).
So on the Form Load event I have
ds1.Clear()
oleda.Fill(ds1, "tlb1")
But when the form loads I do not see any data in my
textboxes. Obviously I am missing something. I mean,
yeah, I could programmatically populate each textbox, but
I need to do it through the Databindings. I would be very
appreciative if someone could tell me what else I need to
do for data to show up in my textboxes with databinding.
Then I could take it from there to cycle through the rows
of the dataset.
Thanks in advance,
Rich
I have successfully created an oledbconnection (oleconn)
to an Access mdb file along with an oleaDBdapter (oleda)
and a dataset (ds1). If I loop through the dataset
For i = 1 to 10
For Each col in ds1.Tables(0).Columns...
Console.Write col....(0,i), ...(1,i)...(2,i)
Next
next
I get data for the whole table. I defined the table name
from Access (tbl1) as dtTbl1, and each of 3 fields (fld1,
fld2, fld3) as dcfld1, dcfld2, dcfld3 in the dataset
object. Now I have 3 textboxes on a form, txt1, txt2,
txt3. When I bind these controls to the dataset I see ds1
in the Databindings Property. When I expand ds1 I see
tbl1 (not dtTbl1) and then when I expand tbl1 I see
fld1... (and not dcfld1...). So I select fld1 and press
Enter and for txt2, txt3. (Note: I do see dtTbl1 in the
Databindings property just below ds1. I tried selecting
that and the fields dcfld1..., but that did not yield
anything either).
So on the Form Load event I have
ds1.Clear()
oleda.Fill(ds1, "tlb1")
But when the form loads I do not see any data in my
textboxes. Obviously I am missing something. I mean,
yeah, I could programmatically populate each textbox, but
I need to do it through the Databindings. I would be very
appreciative if someone could tell me what else I need to
do for data to show up in my textboxes with databinding.
Then I could take it from there to cycle through the rows
of the dataset.
Thanks in advance,
Rich