Create Database with Uni Dac in MS SQL Server

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
alf.krause
Posts: 7
Joined: Wed 20 Sep 2006 09:44

Create Database with Uni Dac in MS SQL Server

Post by alf.krause » Thu 15 Apr 2010 07:14

How can create a DataBase in MS SQL Server with Uni Dac.

After Connect to Datebase i checked the connection error, then i disconnect and wan't connect to the master db. Than i become an Error: EOLEDBError Multiple Step OLE DB operation generated errors.

THX

Alf

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Fri 16 Apr 2010 07:19

To solve this problem you should connect to SQL Server without specifying the Database property of TUniConnection. Then create a database using the 'CREATE DATABASE' statement, like this:

Code: Select all

UniConnection.ExecSQL('CREATE DATABASE "database_name"', []);
After this you can set the Database property to the new database name and reconnect.

Post Reply