Results 1 to 12 of 12
  1. #1
    2 Star Lounger
    Join Date
    Mar 2003
    Posts
    191
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Database Advice (VB6)

    Hi all - Some database advice would be appreciated.
    The application I am trying to create basically will be a series of dates, times and explanatory notes for clients to send their travel requests to my agents via e-mail. The clients will be able to advise of up to 10 requested date/times for flights and 5 each of hotel booking requests and hire car booking requests.
    My question is on the database to hold and retreive this information for later use.
    Is there a easy way of setting up a database based on the fields I currently have created in VB6, or should I create a database in Access (or Excel spreadsheet???) and link that db to my VB application? As I am trying to make this app as easy to use as possible as the potential users are not very computer literate, ease of use is essential. When completed I hope to be able to load the completed .exe file on stand alone computers for the clients to use.
    Any advice appreciated.

    Bill

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Database Advice (VB6)

    I assume this is related to the thread begun in <post#=271557>post 271557</post#>. When you say fields, do you mean controls on a form, textboxes, etc? The reason I ask is because the term fields normally refers to columns in a table, and that would suggest that you have already created a database of some sort. Visual Basic can use the Jet engine to create an Access database without using Access directly. Is that what you've done?
    Charlotte

  3. #3
    2 Star Lounger
    Join Date
    Mar 2003
    Posts
    191
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Database Advice (VB6)

    Charlotte,
    Yes it does relate to the post you mentioned. If VB can use the Jet engine to create a database, and it is easy to do, I think that is my answer. Any advice on the best way to do this as I haven't even started to create a database just yet. I was trying to make extra sure that I had all the fields I needed before I started this part. Is this the correct approach?
    Thanks so much for your help. It is really appreciated.

    Bill

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Database Advice (VB6)

    I would recommend creating the database in Access interactively, once you have decided on the tables and fields you are going to need.

  5. #5
    2 Star Lounger
    Join Date
    Mar 2003
    Posts
    191
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Database Advice (VB6)

    Hans - By the term "interactively" do you mean with the Jet engine?

    Bill

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Database Advice (VB6)

    By interactively I meant:
    Start Microsoft Access.
    Create a new blank database.
    Create a new table in design view.
    Define the fields and their properties.
    etc.

    When you're finished, make a copy of this database and use that for testing.

    As I assume you will have to create this blank database just once, so starting Access to create the database "by hand" is probably easier than trying to figure out how to create it in code.

  7. #7
    2 Star Lounger
    Join Date
    Mar 2003
    Posts
    191
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Database Advice (VB6)

    Hans,
    Just one thing on this. Do I have to name the fields EXACTLY as I have named the controls in VB6? It seems the easiest way to go but I just want to make sure from the start.
    Thanks for your help.

    Bill

  8. #8
    Super Moderator
    Join Date
    Dec 2000
    Location
    New York, NY
    Posts
    2,970
    Thanks
    3
    Thanked 29 Times in 27 Posts

    Re: Database Advice (VB6)

    Bill,

    I'm definitely not one of Access experts here, but as an experienced Word VBA type who is only now struggling to learn the ins and outs of Access development, perhaps my perspective is relevant:

    It will be virtually impossible for you to build the database portion of your application (nice-looking form, by the way!), from the place where you currently are in terms of DB dev knowhow. Posting questions in the Lounge is a great way to speed up learning along the way, but in this case there's too much foundation knowledge which needs to get filled in first - it's a very big topic and really requires some hitting the books in order to get the necessary foundation of knowhow.

    The Access experts may have better book recommendations, but I swear by Alison Balter's 'Mastering Access 2000 (or 2002 as relevant) Development' - since you are using a VB front end for your app, you don't need to learn all about building Access forms, reports etc. but you do you need to learn about the theory and practice of designing and building database tables - expect to spend some dozens of hours acquiring a foundation of knowledge in this topic - almost everything in development revolves around data, so the time invested in getting this knowhow will be well worth it.

    Get the foundation knowledge, then think about how you can apply it to your project, and then post back here with any specific issues you get stuck on.

    My 2 cents....

    Gary

  9. #9
    2 Star Lounger
    Join Date
    Mar 2003
    Posts
    191
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Database Advice (VB6)

    Gary - Thanks for the advice (and compliment:-) ). In the distant past I had a fair bit of experience in creating, programming and macro's in Access. It was many years ago and you are quite right I will be rusty with it's use with my application. I am brushing up now.
    Thanks heaps.

    Bill

  10. #10
    Platinum Lounger
    Join Date
    Nov 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    5,016
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Database Advice (VB6)

    Just out of interest, there's quite a good <img src=/S/free.gif border=0 alt=free width=30 height=15> book (PDF) called SQL: A Practical Introduction.
    Although it's geared to MySQL, it has some very good generic content. For the price, it's definitely worth a look. <img src=/S/grin.gif border=0 alt=grin width=15 height=15>

    Alan

  11. #11
    Silver Lounger
    Join Date
    Mar 2001
    Location
    Springfield, Ohio, USA
    Posts
    2,136
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Database Advice (VB6)

    You can name the tables/fields anything (these names will be used in properties of your controls), but convention is to use a tbl & fld prefix for tables and fields. For now, in Access, just create a simple flat DB and add some sample data to it. Then in VB you can use the Application Wizard to build a data form. That will allow you to look at the code and properties that need to be set to access a database. However, if you have built Access apps in the past, why bother with VB, just do it all in Access. As previous posts have indicated, using a database in VB is non-trivial. Also, depending on what Jet engine you have in VB, you may have to use Access 2K or 97. You can also build the DB entirely in VB using the Add-Ins | Visual Data Manager menu. --Sam
    <font face="Comic Sans MS">Sam Barrett, CACI </font face=comic>
    <small>And the things that you have heard... commit these to faithful men who will be able to teach others also. 2 Timothy 2:2</small>

  12. #12
    Super Moderator
    Join Date
    Dec 2000
    Location
    New York, NY
    Posts
    2,970
    Thanks
    3
    Thanked 29 Times in 27 Posts

    Re: Database Advice (VB6)

    Alan,

    Thanks for the link - I've bookmarked it. Probably will look at it onscreen since at over 1000 pages, it would actually get very pricey to print out on my inkjet at home! <img src=/S/wink.gif border=0 alt=wink width=15 height=15>

    Gary

Posting Permissions

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