Solved

how to create a database using vb

Posted on 1998-11-06
4
133 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 20 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
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…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

830 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