Results 1 to 4 of 4

Thread: how to use data control?

  1. #1

    Thread Starter
    Member
    Join Date
    Jul 2008
    Posts
    38

    how to use data control?

    im a vb6 user and kinda noob. still trying to learn how to use database here and i have this small book about vb6. ok to make the story short ill paste the instruction i see in the book

    1. select and click the visual basic under the microsoft visual studio at the start of the taskbar and programs submenu of the operating system.

    2. start a new project na select the standard exe on the given displayed items, then click the open command button. set the caption of the form to Using Data control 1

    3. double click two text boxes and a data control in the tool box to add them into the form.

    4. widen the data control so that we can see its caption.

    5. set the properties for the data control as follows:

    DatabaseName: C:\Program Files\Microsoft Visual Studio\VB\BIBILIO.MDB

    (im kinda new to databases. when i tried to create a database file in ms access 2007 it becomes .accdb format).

    6. set the properties for text box 1:

    DataSource: Data1
    DataField: Au_ID

    7. Set the properties for text box 2:

    DataSource: Data1
    DataField: Author

    8. run the application system by selecting the run menu at the menu bar and click the start item(or click the run icon at the tool bar).

  2. #2
    Junior Member
    Join Date
    Jan 2009
    Posts
    16

    Re: how to use data control?

    Bound Controls are evil. Learn ADO instead. There are thousands of examples on the forums

  3. #3
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Re: how to use data control?

    Quote Originally Posted by Thomas.Fredrickson
    Bound Controls are evil. Learn ADO instead. There are thousands of examples on the forums
    Amen. And if you go to the VB FAQ forum you'll find out how to do it.

  4. #4
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: how to use data control?

    Here is an FAQ article that explains why data controls/bound controls are a bad idea, and why your book is not really meant for VB6 (but an earlier version): Why is using bound controls a bad thing?

    That is one of several articles in our Database Development FAQs/Tutorials (at the top of the Database Development forum) that you will probably find useful, and it links to another article that shows how to use the recommended alternative to data controls (which is ADO code).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width