FLL
Jun 28th, 2000, 12:08 PM
Hello, all...I have a question, maybe simple in its nature, about building a query interface within VB6 using ADO...actually one big question and a couple of requests for suggestions. Maybe some of you have programmed these kinds of apps before...let me explain:
I'm a relatively inexperienced programmer with VB6 and database access. I've been asked to build an application for my dad's company (thank goodness a quick development and flawless program is not expected in the next week or two) that will track customers as well as inventory. For the customer database, I have two tables: 1) records customer properties...name, address, email, unique customer ID (generated by the database), etc 2) records of purchases through the store. The two are related through customer ID. But this is just background info and is beside the point of what I need to know and can't find anywhere. I have searched high and low for examples on the code to build a query form for the company to use. I want the form to allow the user to search on any of the many fields in the database..probably through text boxes, drop down lists, etc. How can I generate the code for this? I do know SQL, but I don't know what kind of code to put in the program...I know that often some fields will be left blank, like if they just wanted to search by name and not customer ID. I have no idea where to start. Is there a wizard for this in VB? I know about the query builder, but, from what I can see, I cannot incorporate this into the user interface where the user can enter info into a variety of fields and get the results...I guess the bottom line of the problem is I don't know how to build the code from multiple fields when all of them aren't filled in. Any guidance or direction toward a good manual or example would be appreciated. Also, for those who are experienced, what kind of database should I use for speed? Access? Oracle, etc...? The database will be large. Also, any tips on what to do with the record set would be helpful...how to have it clear for a new search...with the option to save, etc....I realize this is a large question, and I am hoping that VB in itself offers a simple solution...maybe a query builder for the user interface? I don't know...can't find any help on the subject (all I keep coming up with is the query bulider option which seems more applicable to the developer than the user). Any help or example code would be GREATLY appreciated. Thank you. Have a wonderful day.
FLL
I'm a relatively inexperienced programmer with VB6 and database access. I've been asked to build an application for my dad's company (thank goodness a quick development and flawless program is not expected in the next week or two) that will track customers as well as inventory. For the customer database, I have two tables: 1) records customer properties...name, address, email, unique customer ID (generated by the database), etc 2) records of purchases through the store. The two are related through customer ID. But this is just background info and is beside the point of what I need to know and can't find anywhere. I have searched high and low for examples on the code to build a query form for the company to use. I want the form to allow the user to search on any of the many fields in the database..probably through text boxes, drop down lists, etc. How can I generate the code for this? I do know SQL, but I don't know what kind of code to put in the program...I know that often some fields will be left blank, like if they just wanted to search by name and not customer ID. I have no idea where to start. Is there a wizard for this in VB? I know about the query builder, but, from what I can see, I cannot incorporate this into the user interface where the user can enter info into a variety of fields and get the results...I guess the bottom line of the problem is I don't know how to build the code from multiple fields when all of them aren't filled in. Any guidance or direction toward a good manual or example would be appreciated. Also, for those who are experienced, what kind of database should I use for speed? Access? Oracle, etc...? The database will be large. Also, any tips on what to do with the record set would be helpful...how to have it clear for a new search...with the option to save, etc....I realize this is a large question, and I am hoping that VB in itself offers a simple solution...maybe a query builder for the user interface? I don't know...can't find any help on the subject (all I keep coming up with is the query bulider option which seems more applicable to the developer than the user). Any help or example code would be GREATLY appreciated. Thank you. Have a wonderful day.
FLL