Search found 190 matches

by ertank
Thu 29 Sep 2022 17:26
Forum: InterBase Data Access Components
Topic: Delphi6, TIDatabase1 component, unsupported on-disk structure for file 01.FDB; found 12.0, support 13.0
Replies: 6
Views: 10303

Re: Delphi6, TIDatabase1 component, unsupported on-disk structure for file 01.FDB; found 12.0, support 13.0

JanekRoos wrote: Thu 29 Sep 2022 06:08 Hello, Erlank!

Does UniDAC component need working Firebird server for connecting with 01.fdb file?

Kind Regards,
Janek from Estonia
Hello,

Yes and this is because Firebird force it that way.
by ertank
Thu 29 Sep 2022 17:24
Forum: InterBase Data Access Components
Topic: Delphi6, TIDatabase1 component, unsupported on-disk structure for file 01.FDB; found 12.0, support 13.0
Replies: 6
Views: 10303

Re: Delphi6, TIDatabase1 component, unsupported on-disk structure for file 01.FDB; found 12.0, support 13.0

JanekRoos wrote: Wed 28 Sep 2022 14:27 Hello, Ertank!

Is it possible to connect with Delphi 6 to 01.fdb
(made in FIrebird 3.0) regardless of which version of Firebird is installed on the machine and regardless of which version of Firebird is installed on the machine?
Hello,

My knowledge, that is not possible. Because Firebird does not allow that.
Firebird 3.0 can be accessed with Firebird 3.0
Firebird 4.0 can be accessed with Firebird 4.0

Each major version has a different internal database structure. What is suggested is you should match database version and Firebird version and Firebird client dll version all.
by ertank
Wed 28 Sep 2022 13:03
Forum: InterBase Data Access Components
Topic: Delphi6, TIDatabase1 component, unsupported on-disk structure for file 01.FDB; found 12.0, support 13.0
Replies: 6
Views: 10303

Re: Delphi6, TIDatabase1 component, unsupported on-disk structure for file 01.FDB; found 12.0, support 13.0

Hello,

Here you can find explanation of Firebird and Interbase OSD numbers
https://ib-aid.com/en/articles/all-fire ... -versions/

Basically, your FirebirdSQL version that IBDAC using seems like version 4.x and the database you are trying to open seems like a version 3.x database.

If you have a simple Virtual Machine, you can install FirebirdSQL 3.0 in it, copy that database you have in there and try to connect that database using FirebirdSQL 3.0 in this VM.

There is a way to make FirebirdSQL 4.x read FirebirdSQL 3.x databases. Basically, you will need FirebirdSQL 3.x engine12.dll/engine12.so file to be copied in FirebirdSQL 4.x "plugins" directory and restart FirebirdSQL 4.x server. If that is what you need, you can search more details about that on the internet.
by ertank
Sun 28 Aug 2022 23:08
Forum: Universal Data Access Components
Topic: TUniDump specific transaction
Replies: 1
Views: 7809

TUniDump specific transaction

Hello,

I am using UniDAC 8.3.2, Delphi 10.4.2, FirebirdSQL 4.0.1 32bit

By my application design, TUniConnection.DefaultTransaction assigned as a specific readonly transaction.

When I try to restore, TUniDump gives error saying "attempt to update during read-only transaction".

Is there a way to assign a separate transaction to TUniDump?
If not, is there any workaround I can use for this problem?

Thanks & Regards,
Ertan
by ertank
Thu 19 May 2022 09:54
Forum: Universal Data Access Components
Topic: UniQuery cannot handle large tables
Replies: 3
Views: 1558

Re: UniQuery cannot handle large tables

Hello,

Your query reads all records in memory as you use qryAction.next
UniDAC has feature called UniDirectional keeping only single record in memory.
UniDirectional query can only use Next. Hence the name.

If all you need to walk in all records, you can use UniDirectional as below

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;
You can find additional information about UniDirectional here
https://docs.devart.com/unidac/devart.d ... tional.htm
by ertank
Wed 03 Nov 2021 12:16
Forum: InterBase Data Access Components
Topic: Firebird remote server connection without DLL
Replies: 2
Views: 7961

Re: Firebird remote server connection without DLL

Hello,

My knowledge, you do absolutely need fbclient.dll for FirebirdSQL database access.

Having said so, you can maybe use EXE resources and put necessary DLL file in your EXE as a resource. Later, you can read it at run time and save to disk, next to your EXE for accessing your FirebirdSQL databases from your client's computers.

Thanks & Regards,
Ertan
by ertank
Wed 03 Nov 2021 07:41
Forum: Universal Data Access Components
Topic: FirebirdSQL 3.0.7 Embedded - create database
Replies: 2
Views: 1305

FirebirdSQL 3.0.7 Embedded - create database

Hello,

I am using Delphi 10.4, UniDAC 8.3.2, FirebirdSQL 3.0.7 Win32

I can successfully create databases using UniDAC if FirebirdSQL is running as a server. When I try the same using embedded connection, I get below error:

Code: Select all

Unable to complete network request to host "xnet://Global\FIREBIRD"
My knowledge, when FirebirdSQL is in embedded mode, only provider available is "Engine12". So, XNET and TCP connection is not possible.

Identical code can create a database successfully if there ls a server service running. I am sharing my database create function below.

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;
Moreover, I first asked in FirebirdSQL support group and got confirmation that it is actually possible to create databases using embedded FirebirdSQL. Example I am provided is TIBDatabase (IBX) is capable of doing that.

I would like to learn if there is anything I am overlooking at for the embedded database creation. I appreciate any help.

Thanks & Regards,
Ertan
by ertank
Mon 10 May 2021 21:05
Forum: Universal Data Access Components
Topic: Problem with "prDirect" provider
Replies: 3
Views: 2848

Re: Problem with "prDirect" provider

Hello,

It is sometimes firewall devices breaking connections after a certain idle time in a corporate environment. It worth to check this out.

Regards,
Ertan
by ertank
Fri 26 Mar 2021 08:23
Forum: Universal Data Access Components
Topic: Create FirebirdSQL database on remote server
Replies: 3
Views: 2078

Re: Create FirebirdSQL database on remote server

Hello,

That did work. I also added port as an incoming parameter to my function as port is different than default in rare cases

Code: Select all

Script.SQL.Add('create database ' + QuotedStr(Server + '/' + Port.ToString() + ':' + DBName));
Thanks.
by ertank
Sun 14 Mar 2021 20:53
Forum: Universal Data Access Components
Topic: SecureBridge - Loading a certificate at run-time
Replies: 1
Views: 965

SecureBridge - Loading a certificate at run-time

Hello,

I am using Delphi 10.3.3, UniDAC 8.3.2, SecureBridge 9.4.1, targetting FMX Android32 platform.

I would like to load client certificate and private key files at run-time into a TscMemoryStorage component. I know how to load private key at run-time. Unfortunately, I could not see how I should load certificate file at run-time.

I have a CRT extension certificate file with a content like below

Code: Select all

-----BEGIN CERTIFICATE-----
(Base64 encoded data)
-----END CERTIFICATE-----
There is no problem loading that certificate file in any storage component at design time. No error or anything.

I appreciate a small example for run-time certificate file loading.

Thanks & Regards,
Ertan
by ertank
Thu 25 Feb 2021 19:25
Forum: Universal Data Access Components
Topic: Create FirebirdSQL database on remote server
Replies: 3
Views: 2078

Create FirebirdSQL database on remote server

Hello,

I am using Delphi 10.3.3, UniDAC 8.3.2, FirebirdSQL 2.5.9 and targeting Win32 executable.

I have below function which works fine on computers where FirebirdSQL server is installed, my application is installed and database is created on that very same computer.

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;
I now need to create a database on a remote server. Lets say, My application is running on computer A and there is another computer B on same LAN. I want to create a database from A on B. When I used above function to achieve that I got below error written in my log

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. 
I did double check that target directory exists on the remote computer. I also manually copy a firebirdsql database on that directory on remote server and I could establish a successful connection, write data in it, etc. My only problem is that I cannot remotely create a database.

Any help is appreciated.

Thanks & Regards,
Ertan
by ertank
Thu 01 Oct 2020 12:47
Forum: Universal Data Access Components
Topic: [ODBC Microsoft Access] The operating system is not presently configured to run this application
Replies: 2
Views: 3127

Re: [ODBC Microsoft Access] The operating system is not presently configured to run this application

Hello,

I just hit same problem, yesterday. "Online Repair" of Microsoft Office solved the problem. I needed to re-enter license information for Microsoft Office after repair finished.

I do not think that is UniDAC specific. Are you able to open and use databases using Access on these machines you have the error?

Thanks & Regards,
Ertan
by ertank
Wed 08 Jul 2020 07:55
Forum: Universal Data Access Components
Topic: SQL Server nested transactions
Replies: 7
Views: 2093

Re: SQL Server nested transactions

Hello,

You might want to check below old blog and do same tests on your SQL Server 2017 to be sure that nested transactions does actually work.

https://www.sqlskills.com/blogs/paul/a- ... uter%20one.

Thanks & Regards,
Ertan
by ertank
Wed 27 May 2020 12:14
Forum: Universal Data Access Components
Topic: Registry information is damaged or missing. Make sure the provider is installed and registered correctly
Replies: 3
Views: 1641

Re: Registry information is damaged or missing. Make sure the provider is installed and registered correctly

Hello,

Just to clarify your problem further it might help to provide answers to below questions
- Do you have problem establishing a connection in Delphi IDE?
- Is your EXE file 64Bit?

Thanks & regards,
Ertan
by ertank
Wed 25 Mar 2020 12:30
Forum: Universal Data Access Components
Topic: Safe way to pass a date time value to string in a query
Replies: 5
Views: 1599

Re: Safe way to pass a date time value to string in a query

I meant to format your date/date time like that and pass as if it is a string parameter (with single quotes)

Today is 25th of March, 2020 15:29

That should be formatted as
2020-03-25 15:29:00

And passed as a string parameter to query.

That format normally accepted by common sql servers. Almost all of them