*

VB Database: Challenge Lab Week 4

Golly, a  bunch of you mentioned how disappointing your Exercises for Lesson 4 were, implying boredom...

Mwahahahahahahahaha!!!

Your Challenge Lab for Week 4 is to change the Data Control on the Users form to an ADO Data Control.  But, wait, that's not all!

Specifically, I want you to:

  • Use the ADO Data Control to display data from the Users table in the China database.  You can either name the control adcUsers or adoUsers, whichever is easier for you to remember what it is when you go to code it later.  Name will be the only property you set at design time.  The other properties will be set at runtime.
    • Using the ADO Data Control
    • ADO Data Control (especially the Example link)

      One of the properties you'll be dealing with concerns connecting to the China database. Use a Universal Data Link (UDL) file; the Microsoft Jet 4.0 OLEDB Provider is your friend.

    Your textboxes won't let you set design time properties if the data control doesn't have them.  (I'm mean, aren't I? mwahaha...oh, sorry..)

  • Use runtime code to set the MaxLength of the bound textboxes instead of the hard-coded design time property. 
    • An exciting way to do this is to remember that we're interested in the User table's fields' "FieldSize" property, which is expressed in ADO-land as "DefinedSize"
       
  • The forms are objects that need to be explicitly released.  Do this.
  • Add a menu to frmUsers to Exit the form.  Use a control array structure.
     
  • Extra credit: re-do the menus on frmMain so that they use control arrays

If you have any questions, yes, I am here, but remember that MSDN is your friend, too.  (Most of you have received your scrubs, after all! ;-)  Please try to find the answer on MSDN before asking me.  (That's part of the Challenge aspect...)

Download Proposed solution  [It does assume you've done the Challenge Lab for Week 1 on resource files, incidentally.]



Internet Content Rating Association Valid CSS!

Alrak's Course Resources ©2002-2007 Karla Carter. All rights reserved. This material (including, but not limited to, Mini-lectures and Challenge Labs) may not be reproduced, displayed, modified or distributed without the express prior written permission of the copyright holder. For permission, contact Karla.