Results 1 to 8 of 8

Thread: Need some advice

  1. #1

    Thread Starter
    Fanatic Member louvelle's Avatar
    Join Date
    Jun 2008
    Posts
    513

    Need some advice

    Hi...

    Is there a code where you will create a new table with fields in Microsoft Access 2003?

    I have a problem with my project. My project is all about Video Rentals and I made a database using ADO Data Control. In my project, there is a customer's info where he/she will fill out the form. And then there is a listbox where you can see his/her rented videos. That's my problem!

    Since there are different user, there are also different rented videos by each of one of them. I made a table for the customer's info. But I didn't include the rented videos because of that problem.

    If you click on the next button, another list of videos from that user will appear. And when you click again, a different rented videos will again appear and so on and so forth.

    Can you guys give me an advice on solving that matter? Thanks!

    Manny Pacquiao once posted in his twitter:
    It doesn't matter if the grammar is wrong, what matter is that you get the message

  2. #2

    Thread Starter
    Fanatic Member louvelle's Avatar
    Join Date
    Jun 2008
    Posts
    513

    Re: Need some advice

    Here's suppose to be my customer info looks like...
    Attached Files Attached Files

    Manny Pacquiao once posted in his twitter:
    It doesn't matter if the grammar is wrong, what matter is that you get the message

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

    Re: Need some advice

    I don't understand why you want code to create a table, as that is the kind of thing you should be avoiding (it is complex, and likely to cause errors/bugs), and by the look of your project & database you haven't actually got a working program yet.


    When you are creating a database system, the last thing you should be doing is creating the program, first you should be designing the database - work out exactly what information you need to store, and how you are going to store it.

    In this case, I would recommend 3 tables: Users, Videos, and Rentals.

    Have a think about the information that should be stored in each of those tables (including the data type, eg: String/Integer/Date/...), and post what you come up with - we can advise you what should be changed/added.

  4. #4

    Thread Starter
    Fanatic Member louvelle's Avatar
    Join Date
    Jun 2008
    Posts
    513

    Re: Need some advice

    The problem is with the User and the Rentals. As I posted, the users will rent many videos. The video's that were rented will show up with a listbox. If I click on the next button to view other users, the listbox contents will change...

    Manny Pacquiao once posted in his twitter:
    It doesn't matter if the grammar is wrong, what matter is that you get the message

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

    Re: Need some advice

    That is a perfectly normal thing for a database application to do - but at the moment it seems that you are trying to do something that is several steps too far ahead.

    As yet you have almost no code, and the database only contains somewhere to store the User details - surely you are wanting to store the other details (such as which videos have been rented) too?

    If so, what you should be doing first is working out what data you need to store (eg: for User you might want Name/Address/DateOfBirth/..., and for Video you might want Title/Director/...).

  6. #6

    Thread Starter
    Fanatic Member louvelle's Avatar
    Join Date
    Jun 2008
    Posts
    513

    Re: Need some advice

    Ok thanks. I got a better idea. Maybe I should just make a data grid for the rented videos for the month. It only displays the persons name, his/her rented videos, date and time. It would be much easier don't you think?

    Is there a code where the database gets deleted after every 30 days?

    Manny Pacquiao once posted in his twitter:
    It doesn't matter if the grammar is wrong, what matter is that you get the message

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

    Re: Need some advice

    Quote Originally Posted by louvelle
    Ok thanks. I got a better idea. Maybe I should just make a data grid for the rented videos for the month. It only displays the persons name, his/her rented videos, date and time. It would be much easier don't you think?
    A grid is probably a better idea than a list, depending on what you want to show (my preference would be to combine a grid for rentals with textboxes for the persons details).

    The important thing is that you still need to store the information in the database somehow - which means my advice still stands.


    Once you have the database set up it is much easier to build the program, but if you set the program up first you will need to re-write lots of it (perhaps even all of it) when you find that you need to change the database.
    Is there a code where the database gets deleted after every 30 days?
    That would be possible, but it would be better to keep the data, and just ignore the old data in your program (which would just be an extra condition in the Where clause).

    Doing that would mean less work, and you can look at the history if you want to, and also you aren't relying on the automatic-delete working properly.

  8. #8

    Thread Starter
    Fanatic Member louvelle's Avatar
    Join Date
    Jun 2008
    Posts
    513

    Re: Need some advice

    Ok then. I'll just post on this thread if I have some questions regarding to my project. I won't mark this as solved yet because I know there will be some problems on my project. And besides, I don't want to flood this forum with many threads, right? Ahaha... Thanks a lot!

    Manny Pacquiao once posted in his twitter:
    It doesn't matter if the grammar is wrong, what matter is that you get the message

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