Simple Data Environment Question


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Simple Data Environment Question

Hybrid View

  1. #1
    Alex Nitulescu Guest

    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)




  2. #2
    John Standen Guest

    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)
    >
    >
    >




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center