Click to See Complete Forum and Search --> : database apps
Cpuser
Jun 10th, 2000, 01:29 AM
I am faily new to Visual Basic and I have a question regarding database applications. Would it be possible to create a simple (if you can call it that) program that can do the basic functions of: adding and removing records, displaying them in a grid, and being able to create a new db file with preset fields (not just a Biblio.mdb browser). I am a little confused by the tutorials, so if anyone has any help or information of where I can find some more on this, or even a sample program, it would be greatly appreciated. Thanks.
No problems, the normal database actions Save/Update/Delete/Search are fairly straight forward. Your next question would seem to imply createing a new .mdb, providing preset Field definitions, and populating with data from an existing .mdb. Once again yeap not a problem, a bit more complex but still readily achievable
Post actual questions, and include the names of your controls, to get usable code snippets back. What l mean by that is start your app at the beginning, and then ask questions as problems arise.
Hope this gives you hope, just reply with questions
Cpuser
Jun 12th, 2000, 05:18 AM
Thanks for the reply! Ok, here is my first question (bear with me please).
I would like to create a program to store book information (author, title, etc.) and be able to save each database as a file. So, when one opens the program it starts with a clean grid and text boxes, and from there they can enter the information (add, delete, etc) and save the database, or open an existing file and continue to edit it. What would the best way to accomplish this? I have read a tutorial on creating temporary .mdb files, would that be a way to solve this? So far I have just a basic data object and a dbgrid not set to any file, and also the text boxes (but I have no problems with the add/delete/search features yet). Thanks.
Do you mean that each time the program is run, it will create an entirely new blank mdb file. Then allow the end user to process their own records. How would a user therefore go back to an already created database for further processing. Could think in terms of an additional user id field and use SQL to restrict access to only those records which have the user's id.
On another note don't even think about data binding controls, this is a really dump approach which will cause you heartache and grief later in your project. Think in terms of data classes and a three tier approach. Yes people will say this is over-kill but what the hell it is the most logical approach.
VB can quite happily create new mdbs with data definitions etc, though l must admit to being a bit rusty on this. Will drag out an old project tonight and refresh myself on it. Takes a bit of effort but is worth it.
Cpuser
Jun 12th, 2000, 06:30 AM
Sorry if I am a little unclear in my question. The idea is a basic database opening/editing/saving program. Just like a text editor can create new text files, edit them, and save them. I would like to be able to open/edit/save .mdb files (or other database files) but with present fields (author, title, etc) set by the program. And by edit I mean add/remove new entires and such. I hope this clears it up a little.
Ok will search out an odd app which did this and extract details for you...not a problem...ya want a demo project, (vb5 sp3) email me at jeff.ritchie@fujitsu.com.au
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.