Solved

Creating MDB Database in Code...

Posted on 2001-09-04
3
157 Views
Last Modified: 2010-04-06
        I wonder if there?s anyway do create MDB Database in code with Delphi, say, Just Tell me how Create  Database ?MyDB.MDB?  in Folder ?C:\Database?. Show me an example of code, I?ll give you my points...

0
Comment
Question by:DOOM_DAEMON
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 1

Expert Comment

by:piscean
ID: 6453336
This site is just what you want bro ... You don't have to give me the credits ... (but you may if you like ...)

http://delphi.about.com/library/weekly/aa072401a.htm
0
 
LVL 27

Accepted Solution

by:
kretzschmar earned 50 total points
ID: 6455901
a sample by paul sutton
(from my knowledgebase)

unit Mdb;

interface
uses
 Windows,ComObj, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
 StdCtrls;

procedure BldMdb(FileName:String);
implementation
const
 dbLangGeneral = ';LANGID=0x0409;CP=1252;COUNTRY=0';
 dbVersion30 = 32; {choose this for Access 95 database}
 dbEncrypt = 2;
var
 DBEngine: Variant;
 Workspace: Variant;

procedure BldMdb(FileName:String);

begin
 DBEngine := CreateOleObject('DAO.DBEngine.35');
 Workspace := DBEngine.Workspaces[0];
 Try
 Workspace.CreateDatabase(Filename, dbLangGeneral, dbEncrypt);
 Except
 end;
end;

end.

meikl ;-)
0
 
LVL 1

Author Comment

by:DOOM_DAEMON
ID: 6461159
        Thanks for ya, Piscean. I've finally found that you suggested a great site of delphi source. And Thanks kretzschmar  for your demonstration. You help me out!, you know?
0

Featured Post

Independent Software Vendors: 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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses
Course of the Month9 days, 15 hours left to enroll

624 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