Hello,
Yes and this is because Firebird force it that way.
Hello,
Code: Select all
qryAction.sql.text := 'SELECT * FROM CUSTOMERS';
qryAction.ReadOnly:=true;
qryAction.UniDirectional:=true;
qryAction.open;
//qryAction.first; -- no need for this line
while not qryAction.EOF do
qryAction.next;
Code: Select all
Unable to complete network request to host "xnet://Global\FIREBIRD"
Code: Select all
function CreateFdbDatabase(const DBName, Server, DatabaseUser, DatabaseUserPassword, FBClientDll: string; const Codepage: string = 'WIN1254'; const Port: Word = 3050): Boolean;
var
DB: TUniconnection;
Script: TUniScript;
begin
DB := nil;
Script := nil;
try
DB := TUniConnection.Create(nil);
DB.ProviderName := TInterBaseUniProvider.GetProviderName();
DB.Server := Server;
DB.Port := Port;
DB.SpecificOptions.Values['ClientLibrary'] := FBClientDll;
if DB.Server.IsEmpty then // When embedded, this is empty
DB.SpecificOptions.Values['Protocol'] := 'Local'; // We must switch to Local for embedded
Script := TUniScript.Create(nil);
Script.OnError := TMyClass.ScriptError;
Script.Connection := DB;
Script.NoPreconnect := True;
if not Server.IsEmpty then
Script.SQL.Add('create database ' + QuotedStr(Server + '/' + Port.ToString() + ':' + DBName))
else
Script.SQL.Add('create database ' + QuotedStr(DBName));
Script.SQL.Add('USER ' + QuotedStr(DatabaseUser) + ' PASSWORD ' + QuotedStr(DatabaseUserPassword));
Script.SQL.Add('PAGE_SIZE 16384');
if not Codepage.IsEmpty then
Script.SQL.Add('DEFAULT CHARACTER SET ' + Codepage);
try
Script.Execute();
except
on E: Exception do
begin
if Assigned(FirebirdSQLLog) then FirebirdSQLLog.LogError('Script Error: ' + E.Message);
Exit(False);
end;
end;
Result := True;
finally
Script.Free();
DB.Free();
end;
end;
Code: Select all
Script.SQL.Add('create database ' + QuotedStr(Server + '/' + Port.ToString() + ':' + DBName));
Code: Select all
-----BEGIN CERTIFICATE-----
(Base64 encoded data)
-----END CERTIFICATE-----
Code: Select all
function CreateFdbDatabase(const DBName, Server, DatabaseUser, DatabaseUserPassword, FBClientDll:string): Boolean;
var
DB: TUniconnection;
Script: TUniScript;
begin
DB := nil;
Script := nil;
try
DB := TUniConnection.Create(nil);
DB.ProviderName := TInterBaseUniProvider.GetProviderName();
DB.SpecificOptions.Values['ClientLibrary'] := FBClientDll;
Script := TUniScript.Create(nil);
Script.OnError := TMyClass.ScriptError;
Script.Connection := DB;
Script.NoPreconnect := True;
Script.SQL.Add('create database ' + QuotedStr(DBName));
Script.SQL.Add('USER ' + QuotedStr(DatabaseUser) + ' PASSWORD ' + QuotedStr(DatabaseUserPassword));
Script.SQL.Add('PAGE_SIZE 16384 DEFAULT CHARACTER SET WIN1254');
try
Script.Execute();
except
on E: Exception do
begin
if Assigned(FirebirdSQLLog) then FirebirdSQLLog.LogError('Script Error: ' + E.Message);
Exit(False);
end;
end;
Result := True;
finally
Script.Free();
DB.Free();
end;
end;
Code: Select all
Script Error: I/O error during "CreateFile (create)" operation for file "C:\DB\BRANCH\TEST.FDB" Error while trying to create file Sistem belirtilen yolu bulamıyor.