Solved

how to create a database using vb

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
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…

914 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now