Create Database, Blob segment size, IB Services, PostgreSQL

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
thoba
Posts: 4
Joined: Thu 16 Oct 2008 09:29

Create Database, Blob segment size, IB Services, PostgreSQL

Post by thoba » Fri 17 Oct 2008 16:53

Hi,

I'm currently using the IBX components to connect to Firebird using D2007 on W2000, XP, and Vista. I'm evaluating UniDac to find out if I can replace IBX. Most of the IBX functionality I find in UniDac but I wonder about the following:

1) Create Database

an analog to the method TIBDatabase.CreateDatabase in IBX I cannot find in UniDac. Your release notes for UniDac 1.2 state that you have added Create Database to TUniScript. I can however not find an example code of how to use it. TUniScript requires a TUniConnection assigned to work, but if I want to create the database that obviously does not exist I cannot call TUniScript.Execute since this tries to open the connection.
The obvious would be to have a method in TUniConnection that like in TIBDatabase.CreateDatabase calls the corresponding provider's API call directly. I cannot see such a method in the trial version 1.2 - how do I get the TUniScript functionality for create database to work?

2) Blob segment size

Using IBX one can define the segment size of individual blobs on writing of the blob. How could I do this in UniDac?

3) IB Services for sweep, statistics, validate, backup and restore

do you have any plans to add access to the IB service API to perform all the above actions? If so, when?

4) Another IBX unrelated question is if you have plans for adding a provider for PostgreSQL to your list of supported providers? If so, when?

Many thanks in advance.

Best regards,

/T

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Thu 23 Oct 2008 13:20

1) The current version of UniDAC requires an active connection to execute CREATE DATABASE statement in TUniScript. We'll consider possibility of making this statement work without active connection in the next UniDAC build.

2) UniDAC does not support setting the segment size for BLOBs. Please tell us how the segment size can be set using IBX.

3) We are not planning to support InterBase services in UniDAC.

4) Currently we are working on the PostreSQL support. We are planning to release the beta version in a month.

thoba
Posts: 4
Joined: Thu 16 Oct 2008 09:29

Blob segment size

Post by thoba » Thu 23 Oct 2008 13:35

Hi,

thank you for your answers. To set blob segment size individually create a class essentially resembling TIBBlobStream. Implement writing using your own blob segement size (FCurSegmentSize below) in your won implementation of the public WriteBlob method...

SegLen := FCurSegmentSize;
while (CurPos ABlobSize) then
begin
SegLen := ABlobSize - CurPos;
end;
if (FLibrary.isc_put_segment(StatusVector, hBlobHandle, SegLen,
PChar(@Buffer[CurPos])) > 0) then
begin
IBDatabaseError;
end;
Inc(CurPos, SegLen);
end;

Best regards,

/T

Challenger
Devart Team
Posts: 925
Joined: Thu 17 Nov 2005 10:53

Post by Challenger » Wed 19 Nov 2008 13:38

We have released UniDAC 2 Beta with PostgreSQL support. We are looking forward to your comments and suggestions.

Post Reply