|
-
Nov 2nd, 2000, 02:57 AM
#1
Thread Starter
New Member
LS
Is there anybody who can help me with some simple SQL-questions? I've never done anything with SQL but I need to build an app with a database (MS access).
Can you tell me how to create a database, read from the database (showing the result) and write (the result) to the database with SQL statements?
And more important how to use them in VB(6).
Thanks!!!
-
Nov 2nd, 2000, 05:35 AM
#2
Fanatic Member
This is much too broad a question - it partly depends on what Database Engine you are using.
Assuming Access (Jet 4) you could use the CreateDatabase command - the actual command depend on whether you use ADO or DAO - ADO is the future so if you do not know either, learn that. This will merely create the file - you will stillneed to create all the tables etc.
To create the tables you would use CREATE TABLE...
To read data from tables you would use the SELECT... form and to put data into a table you would use INSERT...
Check out the Access Help on CREATE TABLE; SELECT and INSERT SQL commands.
You really need a basic primer in SQL and you need to get to know the Database Engine that you will use. There are some good primers on VBWorld.
Good Luck
Paul.
Not nearly so tired now...
Haven't been around much so be gentle...
-
Nov 2nd, 2000, 06:04 PM
#3
Thread Starter
New Member
Paul,
Thanks for the fast reply. Your answer brought up even more questions. Is it possible to give me some advise in this matter? I´m an absolute beginner with databases. The only `database` I´ve ever used is the windows registry.
You sound Dutch to me, I´m I right?
- D -
-
Nov 3rd, 2000, 04:38 AM
#4
Fanatic Member
Hi Dino,
I'm not Dutch but I work for a Dutch bank. I'm ENGLISH!!!
If you have never worked with a database before you really need to get a basic primer that you can read at your leisure. Playing around with Access is a good start (as is getting on VB-World but you cannot beat a good book. How about Access for Dummies - it is a good, CHEAP, basic primer and you should whip through it.
In Access you create a New database form File...New Database...
You can then design your tables and once you have them the wizards will take you through query design. I strongly suggest you look at the NWIND.MDB example database that comes with Access - I didn't for about four years and was amazed at what I had missed.
I would say that the most important thing is to have a clear idea of your data and how it will split down into tables. Write it out on paper first and then play around - you can re-create tables easily in Access so do not be afraid of making mistakes.
Best of luck,
Cheers,
Paul.
Not nearly so tired now...
Haven't been around much so be gentle...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|