?
Solved

how to create a database using vb

Posted on 1998-11-06
4
Medium Priority
?
138 Views
Last Modified: 2010-04-30
teach me how to create an application databse using vb
thankd
0
Comment
Question by:JOHNHO
4 Comments
 
LVL 1

Expert Comment

by:csalves
ID: 1443480
Hello,

Your Question is simple you can execute DDL comands from VB.

For exemple:

IF you have a connection to an INFORMIX USER you can create a VB program to create a database with the SQL ANSI instruction
"CREATE DATABASE <database_name>;"

after that you can create so many tables you wish:
With CREATE TABLE instruction.

Bye,

0
 

Author Comment

by:JOHNHO
ID: 1443481
CAN YOU EXPLAIN MORE TO ME PLEASE
BECAUSE IM SO STUPID
THANKS IN ADVANCE

0
 
LVL 1

Expert Comment

by:tommy_boy
ID: 1443482
Johnho..

Get yourself a copy of DBMapper.  It maps an existing Access Database into Visual Basic code (BAS Module). There you can go through it at your own pace and se exactly how it is done.  DBMapper also creates the queries stored in Acess Databases.

I think it is shareware and you should be able to find it by searching the web. If you can't email me back at tommy_boy@rocketmail.com and I'll send you a copy.

0
 
LVL 3

Accepted Solution

by:
myqlG earned 40 total points
ID: 1443483
using vb5 and DAO:
dim dbsnew as database
dim wrkdefault as workspace

 Set dbsNew = wrkDefault.CreateDatabase("c:\order entry\NewDB.mdb", _
        dbLangGeneral)
       dbsNew.Execute "CREATE TABLE Daily " _
        & "(Operator TEXT, regular INTEGER,gift INTEGER,shipping CURRENCY);"
dbsNew.Close
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month15 days, 21 hours left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question