Main Logo
Articles   Members Online:
-Article/Tip Search
-News Group Search over 800,000 Borland 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
Delphi: How to create DataBase in Sql Server With Code
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 DataBase in Sql Server With Code 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 DataBase in Sql Server With Code 21-Jul-04
Category
Database Others
Language
Delphi All Versions
Views
725
User Rating
8
# Votes
3
Replies
0
Publisher:
Sarbazzadeh, Mostafa
Reference URL:
			1   
2   unit Unit1;
3   
4   interface
5   
6   uses
7     Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
8     Dialogs;
9   
10  type
11    TForm1 = class(TForm)
12      Button1: TButton;
13      ADOConnection1: TADOConnection;
14      procedure Button1Click(Sender: TObject);
15    private
16      { Private declarations }
17    public
18      { Public declarations }
19    end;
20  
21  var
22    Form1: TForm1;
23  
24  implementation
25  
26  {$R *.dfm}
27  
28  procedure TForm1.Button1Click(Sender: TObject);
29  begin
30  
31  // First you connect to sql server
32  AdoConnection.connected := true;
33  // then
34    ADOCommand1.CommandText := 'Create DataBase Saves '+
35    'On '+
36    '(Name = databasename, '+
37    'FileName = '+QuotedStr('C:\database.MDF')+', '+
38    'Size = 50MB, '+           //first size
39    'FileGrowth = 30MB) '+   //growth size in MB
40    'Collate Arabic_CI_AI ';// unicode change to arabic or other unicode
41    ADOCommand1.Execute;                   
42  
43  
44  end;
45  
46  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
Advertisement


Share this page
Advertisement
Copyright © 2017 by No Limit Solutions LLC