Simple Data Environment Question
Hi. I have not used the data environment before. I tried it today the first
time, and I'm stumped:
I created a test database containing only one table, Table1, with only one
field, Field1. I have the rows A, B, ... H
In VB I created a data environment. I select as connection "Microsoft Jet
4.0 OLE DB provider", I select my database, and I do a refresh. On the status
bar it says "Connection1 (connected).
I then add a command, I select Table, for Object Name I select Table1, and
I leave the rest as default. In Field1 I go to properties and I select as
Control "Microsoft Data Combo Control, version 6.0 (OLEDB)". So far so good
- that's what I want to do, to show the letters A..H in Table1 in a combo
box. I drag Field1 on the form and I obtain a label and a combo box. I run
the program and I obtain Field1: A. That's all - I don't see B...H. I check
the bindings of ctlField1 and they're okay. I change the type to dropdown
list. Now it's even worse - I don't see anything. What on earth am I doing
wrong here ? I'm using only the defaults in a very simple case.
I have to mention that I obtain the exact same result if instead of using
a data environment I'm using an ADO Data control and a data bound list control.
I still see only "A" when the style of the list control is "Dropdown List",
and I see nothing at all when the style is "Dropdown Combo".
I have to mention that I obtain the exact same result if instead of using
a data environment I'm using an ADO Data control and a data bound list control.
I still see only "A" when the style of the list control is "Dropdown List",
and I see nothing at all when the style is "Dropdown Combo".
Thank you.
Alex.
(I'm using VB6 SP4)
Re: Simple Data Environment Question
Alex,
Make sure the RowSource is set to eg DataEnvronment1 and RowMember set to
Table1
The reason these are not det by the DE is that these can be bound to a
differnet datasource. Giving you the ability to have the drop-down list
populated by a lookup table and the value entered updating a master table.
Cheers,
John Standen
cyberbas@cherrytech.com.au
Alex Nitulescu <alex.nitulescu@ps.ge.com> wrote in message
news:39edaca1$1@news.devx.com...
>
> Hi. I have not used the data environment before. I tried it today the
first
> time, and I'm stumped:
>
> I created a test database containing only one table, Table1, with only one
> field, Field1. I have the rows A, B, ... H
>
> In VB I created a data environment. I select as connection "Microsoft Jet
> 4.0 OLE DB provider", I select my database, and I do a refresh. On the
status
> bar it says "Connection1 (connected).
>
> I then add a command, I select Table, for Object Name I select Table1, and
> I leave the rest as default. In Field1 I go to properties and I select as
> Control "Microsoft Data Combo Control, version 6.0 (OLEDB)". So far so
good
> - that's what I want to do, to show the letters A..H in Table1 in a combo
> box. I drag Field1 on the form and I obtain a label and a combo box. I run
> the program and I obtain Field1: A. That's all - I don't see B...H. I
check
> the bindings of ctlField1 and they're okay. I change the type to dropdown
> list. Now it's even worse - I don't see anything. What on earth am I doing
> wrong here ? I'm using only the defaults in a very simple case.
>
> I have to mention that I obtain the exact same result if instead of using
> a data environment I'm using an ADO Data control and a data bound list
control.
> I still see only "A" when the style of the list control is "Dropdown
List",
> and I see nothing at all when the style is "Dropdown Combo".
>
> I have to mention that I obtain the exact same result if instead of using
> a data environment I'm using an ADO Data control and a data bound list
control.
> I still see only "A" when the style of the list control is "Dropdown
List",
> and I see nothing at all when the style is "Dropdown Combo".
>
>
> Thank you.
> Alex.
>
> (I'm using VB6 SP4)
>
>
>