To start with, let me lay out the situation. I am a student at the very end of my last assignment of a beginner - intermediate VB class (we have been using VB 2005 Express + MSSQL Express 2005). Anyhow, I really like coding with VB and understand most of what we have learned thus far. However, we have a final project due that is a complete build-from-scratch idea that is useful and contains 10 of 20 requirements as listed on the Rubric.
Without explaining the whole project, the final thing that I am having an issue with (mainly because we delved only once into using Databases - ADO.NET, and that was a VERY basic applicaiton and the database was already built.
Here is the basics of what I am trying to do:
This is a program that generates a sequential list of numbers, based on user input (min and max, plus total amount of numbers) to be used for a raffle type of fundraiser.
So user generates a list of numbers, they enter the lowest number and the total number of ticket/numbers. I can use a Do...While...Lo op to create the list of numbers and then save those into a declared one dimensional array. All good and well, I know how to do that.
The next part is where I am getting hung up. I will have a Next or Save button that when the user clicks it, I want the array to then be saved in a database, with the generated numbers used as the Primary Key of the DB. The database will also have other fields (First Name, Last Name, Phone, Address, Email) that will be Null until a later portion of the application (where I will then enter peoples names who bought the tickets, and will then use a random number generator to pick the winner). It sounds simple enough but cannot figure out how to do it.
Also, if possible, I would love to be able to have each generation of numbers be in a different table (i.e., for more than one raffle, if the user so chooses). So I need help on creating a database (the ones we have used so far have already been created, we just manipulated them) and saving the array as listed above - the other fields will be aded from another form, and I know how to do that.
I am looking for the simplest way to achieve this as it is a simple application.
Thanks!
Mike
Without explaining the whole project, the final thing that I am having an issue with (mainly because we delved only once into using Databases - ADO.NET, and that was a VERY basic applicaiton and the database was already built.
Here is the basics of what I am trying to do:
This is a program that generates a sequential list of numbers, based on user input (min and max, plus total amount of numbers) to be used for a raffle type of fundraiser.
So user generates a list of numbers, they enter the lowest number and the total number of ticket/numbers. I can use a Do...While...Lo op to create the list of numbers and then save those into a declared one dimensional array. All good and well, I know how to do that.
The next part is where I am getting hung up. I will have a Next or Save button that when the user clicks it, I want the array to then be saved in a database, with the generated numbers used as the Primary Key of the DB. The database will also have other fields (First Name, Last Name, Phone, Address, Email) that will be Null until a later portion of the application (where I will then enter peoples names who bought the tickets, and will then use a random number generator to pick the winner). It sounds simple enough but cannot figure out how to do it.
Also, if possible, I would love to be able to have each generation of numbers be in a different table (i.e., for more than one raffle, if the user so chooses). So I need help on creating a database (the ones we have used so far have already been created, we just manipulated them) and saving the array as listed above - the other fields will be aded from another form, and I know how to do that.
I am looking for the simplest way to achieve this as it is a simple application.
Thanks!
Mike
Comment