zeos와 firebird1.5를 사용했어요..
Local에서는 제대로 되는데
remote에서는 디렉토리나 화일존재여부를 체크할수 없습니다.
참고로 저는 코드가 000이라면 000이라는 폴더를 동적으로 만들어서 그안에 DB를 관리하려구 해요..
제발좀 답변 부탁해요..
Procedure DataBaseConnect(xZConnection: TZConnection; xHstName, xPathName, xDBName: String);
var
Props: String;
begin
with xZConnection do begin
Properties.Clear;
HostName := xHstName;
Database := xPathName + '\' + xDBName;
User := 'sysdba';
Password := 'masterkey';
Protocol := 'firebird-1.5';
Props := 'CreateNewDatabase=CREATE DATABASE ''';
if (HostName <> '') or (HostName <> UpperCase('LocalHost')) then
Props := Props + xHstName + ':';
Props := Props + xPathName + '\'+ xDBName + '''' +
' USER ''' + xZConnection.User + '''' +
' PASSWORD ''' + xZConnection.Password + '''' +
' PAGE_SIZE 16384 DEFAULT CHARACTER SET ISO8859_1' +
' FILE '''+ xPathName + '\'+ xDBName + '2.fdb''' + // create a 2nd file
' LENGTH=50000 STARTING AT PAGE 50001';
{$I-}
showmessage(mPathName);
if not DirectoryExists(mPathName) then
mkdir(mpathName);
raise Exception.Create('Cannot create' + mPathName);}
if not FileExists(xZConnection.Database) then
Properties.Add(Props);
Connect;
end;
end;