Alpha Centauri Forums
  Non-SMAC related
  I need some help with visual basic

Post New Topic  Post A Reply
profile | register | prefs | faq | search

Author Topic:   I need some help with visual basic
MangoBreeder posted 09-20-99 10:27 AM ET   Click Here to See the Profile for MangoBreeder   Click Here to Email MangoBreeder  
i need help writing some code which two arrays one which holds the video name and another which holds the number of times it has been rented in the week beginning with the date input. A query would then only select loans made in that time frame and sorts the loans in video code order. A loop would then read each selected record and search for the video code in the video array and then add one to the loan number in the loans array. The two arrays would then be sorted into the order of most loans at the top, and then the top ten printed.

Any help would be very gratefully recivied

Beta1 posted 09-20-99 01:58 PM ET     Click Here to See the Profile for Beta1    
Sounds like a college assignment to me!
MangoBreeder posted 09-21-99 10:25 AM ET     Click Here to See the Profile for MangoBreeder  Click Here to Email MangoBreeder     
Yeah Kinda Any Ideas?
OhWell posted 09-21-99 11:47 AM ET     Click Here to See the Profile for OhWell    
Sounds like a job for SQL.

I could probably help, but I am not sure exactly what you are trying to do. Are you only trying to print the top ten?

�i need help writing some code which two arrays one which holds the video name and another which holds the number of times it has been rented in the week beginning with the date input. �

This seems to indicate that the arrays are �pre-loaded� with the name and loan count. Is that correct?

�A query would then only select loans made in that time frame and sorts the loans in video code order.�

Does the first array have the video �name� or �code� or both or is �code� a third array? Why do you need a query (SQL?) if the arrays already have the required information or is this how the arrays get loaded? Why bother to sort it here?

�A loop would then read each selected record and search for the video code in the video array and then add one to the loan number in the loans array.�

Do all selected records have their loan count incremented?

MangoBreeder posted 09-22-99 08:40 AM ET     Click Here to See the Profile for MangoBreeder  Click Here to Email MangoBreeder     
Well i am trying to print a list of the top 10 video which have been rented in a particuar week.

The first array will have both the video Code and video name

Yes the arrays would have to be pre loaded with both name and loan count.

Yes all selected loans would have their loan incremented becasue they would not be selected if they were not rented in that particualr week.

If you have any other ideas please help me.
The arrays would be loaded via a query

OhWell posted 09-22-99 10:07 AM ET     Click Here to See the Profile for OhWell    
If the arrays are pre-loaded with the names and loan count, then all you would have to do is sort on the loan count and pick the top ten. Or just look at the arrays to determine the top ten without the sort.

Maybe if you could provide a data sample (an example of the data in the arrays) with what the desired results look like it might be clearer to me.

Thread ClosedTo close this thread, click here (moderator or admin only).

Post New Topic  Post A Reply
Hop to:

Contact Us | Alpha Centauri Home

Powered by: Ultimate Bulletin Board, Version 5.18
© Madrona Park, Inc., 1998.