Create a Database directly on Network

Forum related to version 6.5.1 (alpha) and 6.6.x (beta) of ZeosLib's DBOs

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
haentschman
Fresh Boarder
Fresh Boarder
Posts: 20
Joined: 06.11.2007, 22:42

Create a Database directly on Network

Post by haentschman »

Hi all...

:?: is it possible to create a Database directly in the Networkfolder ?

when i use the Property CreateNewDatabase and give as Folder for the new Database the local Folder from the Server i get a Error Message

not a Medium in Drive D::gruebel:

Drive D: is on the Server a HardDrive
but Drive D: is on the local Computer a CD Drive.

...he want to create the Database local :shock:

all the Properties are correct....connect with existing Database works.

can you help ?

Firebird 2.0

[edit]

Code: Select all

Datenbank:= DBOrdnerL + DBDatei;
DMDB.ZConnection1.User:= 'SYSDBA';
DMDB.ZConnection1.Password:= 'masterkey';
DMDB.ZConnection1.Database:= DBOrdnerL + DBDatei;
DMDB.ZConnection1.HostName:= DBHost;
DMDB.ZConnection1.Properties.Add ('CreateNewDatabase=CREATE DATABASE ' +
       QuotedStr(Datenbank) + ' USER ' + QuotedStr('SYSDBA') + ' PASSWORD ' + QuotedStr('masterkey') + ' PAGE_SIZE 4096');
DBOrdnerL = D:\Daten\ -- local Drive on Server
DBDatei = DB.fdb
DBHost = Name of the Server
[/edit]
haentschman
Fresh Boarder
Fresh Boarder
Posts: 20
Joined: 06.11.2007, 22:42

Post by haentschman »

Hi all... :D

i have solved the problem....

if you want to create a database from client on a server on a other maschine use this syntax:

you must set the servername in the "Create Folder" !

Code: Select all

CreateNewDatabase=CREATE DATABASE ' +
       QuotedStr(servername:localDriveOnServer:\Folder) + ' USER ' + QuotedStr('SYSDBA') + ' PASSWORD ' + QuotedStr('masterkey') + ' PAGE_SIZE 4096');
hope it´s helpful for everyone... :D
Post Reply