Creating database

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Posts: 1
Joined: Fri 27 May 2011 11:33

Creating database

Post by devUser102 » Fri 27 May 2011 11:41


I'd like to create database with a given initial size.

I'm using msConn: TMSConnection, and creating without SIZE works fine


but when I add SIZE = 10, it failes.

Any suggestions?


Post by AndreyZ » Fri 27 May 2011 13:43


You can create database with the SIZE option in the following way:

Code: Select all

MSConnection.ExecSQL('CREATE DATABASE MYTEST ON (NAME = mytest_dat, FILENAME = ''D:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\mytestdat.mdf'', SIZE = 10)', []);
For more information, please read this article: ... l.80).aspx

Posts: 2
Joined: Tue 26 Jul 2011 13:19
Location: Lahore

Post by priya » Fri 29 Jul 2011 12:16

Thanks for this, I was also struggling with the same problem and did Not get solution from anyone but finally it is all solve here

Post Reply