Articles   Members Online:
-Article/Tip Search
-News Group Search over 21 Million news group articles.
-Delphi/Pascal
-CBuilder/C++
-C#Builder/C#
-JBuilder/Java
-Kylix
Member Area
-Home
-Account Center
-Top 10 NEW!!
-Submit Article/Tip
-Forums Upgraded!!
-My Articles
-Edit Information
-Login/Logout
-Become a Member
-Why sign up!
-Newsletter
-Chat Online!
-Indexes NEW!!
Employment
-Build your resume
-Find a job
-Post a job
-Resume Search
Contacts
-Contacts
-Feedbacks
-Link to us
-Privacy/Disclaimer
Embarcadero
Visit Embarcadero
Embarcadero Community
JEDI
Links
How to create an MS-Access database during runtime. Turn on/off line numbers in source code. Switch to Orginial background IDE or DSP color Comment or reply to this aritlce/tip for discussion. Bookmark this article to my favorite article(s). Print this article
Create an MS-Access database during runtime. 26-Sep-04
Category
DB-General
Language
Delphi 2.x
Views
447
User Rating
10
# Votes
1
Replies
0
Publisher:
Darley, F. Joe
Reference URL:
			1   unit Unit1;
2   
3   interface
4   
5   uses
6     Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
7     Dialogs, StdCtrls,ComObj;
8   
9   type
10    TForm1 = class(TForm)
11      Button1: TButton;
12      procedure Button1Click(Sender: TObject);
13    private
14      { Private declarations }
15    public
16      { Public declarations }
17    end;
18  
19  var
20    Form1: TForm1;
21  
22  implementation
23  
24  {$R *.dfm}
25  procedure CreateMSAccessDB(filename: string);
26  var  
27    oleDB: OLEVariant; 
28  begin 
29   try 
30    oleDB := CreateOleObject('ADOX.Catalog'); 
31    oleDB.Create('Provider=Microsoft.Jet.OLEDB.4.0;Data Source=' + FileName + ';'); 
32    oleDB := NULL; 
33   except  on e: Exception do
34    showmessage( e.message);
35   end;
36  end;
37  
38  procedure TForm1.Button1Click(Sender: TObject);
39  begin
40   CreateMSAccessDB('c:\test.mdb');
41  end;
42  
43  end.


			
Vote: How useful do you find this Article/Tip?
Bad Excellent
1 2 3 4 5 6 7 8 9 10

 

Advertisement
Share this page
Advertisement
Download from Google

Copyright © Mendozi Enterprises LLC