Search found 5 matches

by Lemmy
Fri 17 Jun 2022 20:27
Forum: PostgreSQL Data Access Components
Topic: working with large objects
Replies: 1
Views: 8926

working with large objects

Hello,
I have this table:

Code: Select all

CREATE TABLE IF NOT EXISTS fdmandant14.postausgang (
  id BigSerial NOT NULL,
  empfaengermail VarChar(100),
  absendermail VarChar(100),
  emailtext Text,
  datum Timestamp,
  gesendet Boolean DEFAULT false,
  beleg Bytea,
  xmlbeleg Bytea,
  patpass Bytea,
  konfi Bytea
);
I use this SQL to insert data:

Code: Select all

qryPOstAusgang.Connection.StartTransaction;
              qryPostAusgang.sql.Text := 'Insert into postausgang Values (:Empfaenger, :Absender, :Emailtext, :Datum, :Gensendet, '
                                       + ':Beleg, :XMLBeleg, :PatPass, :Konfi)';
To set the parameters :beleg, :XMLBeleg,... I use this method:

Code: Select all

procedure CreateLargeObject(const ALargeObject: TPgLargeObject; const AStream: TStream);
  begin
    ALargeObject.Connection := dataPG.PgConnectionFD;
    ALargeObject.ReadBlob;
    ALargeObject.Clear;
    ALargeObject.Truncate(0);
    ALargeObject.LoadFromStream(AStream);
    ALargeObject.WriteBlob;
    ALargeObject.CloseObject;
  end;
and so I execute the method:

Code: Select all

var fs: TFileStream;
fs := TFileStream.Create(PDFPath + AnhangBezeichnung, fmOpenRead, fmShareDenyNone);
try
  CreateLargeObject(qryPOstAusgang.ParamByName('Beleg').AsPgLargeObject, fs);
finally
 fs.Free;
end;
And then I get the error:
EPgError: "Large Object 0 existiert nicht"

What do I wrong?
Best regards
Wolfgang

p.s: I use your contact form (twice) and get a 404, maybe someone can fix this...
by Lemmy
Tue 23 Jul 2019 15:27
Forum: MySQL Data Access Components
Topic: MariaDB 5.5 and lockMode
Replies: 3
Views: 4624

Re: MariaDB 5.5 and lockMode

ah... so if I only user Update/Insert SQL and no bidirectional DB-binding (TDBEdit) .lockMode has no effect...

Thanks!!
by Lemmy
Tue 23 Jul 2019 10:15
Forum: MySQL Data Access Components
Topic: MariaDB 5.5 and lockMode
Replies: 3
Views: 4624

MariaDB 5.5 and lockMode

We want to run a data import program ( lazarus + MyDac and Maria DB 5.5) parallel to different databases:

progA -> dbA
progB -> dbB
progC -> dbC

The Problem: All processes need to connect to a "master" db in which they must update / insert in 2 tables some data. Until now this is no problem, because they run one by one.

I try to produce a "lock problem" with a simple app:
Select * from TableX
while not EOF
INSERT / UPDATE into Table y
NEXT
end;

But I can run this app 2, 3 or 4 times an no lock error is shown (lockmode = lmOptimistic) - and I don't understand that point. Why no lock error is shown..?!?

Best regards
Wolfgang
by Lemmy
Wed 03 Jan 2018 20:34
Forum: PostgreSQL Data Access Components
Topic: PGDump for backup/restore
Replies: 1
Views: 1888

PGDump for backup/restore

Hello,
I found this post

viewtopic.php?f=34&t=13728&hilit=restore

from 2008 in which was recommended to use pg_dump for backup/restore and not TPGDump. How is the state today? Should we use for a complete backup (of a schema) pg_dump?
by Lemmy
Wed 08 Oct 2014 07:49
Forum: EntityDAC
Topic: Tutorial and Express-Edition
Replies: 1
Views: 2401

Tutorial and Express-Edition

Hi,

I tried it twice: First in August and a few days ago with the current release:

I want to implement the Express-Tutorial of EntityDAC (found in EntityDAC.pdf - Creating my First Application with Express Edition). But always if I copy-paste the code to my Model-Unit T*Attribute (TIntegerAttribute,...) is unkown. I put every unit I found in entityDac to the uses - but nothing works.

I wrote two questions to Support and get no answer. Can anybody help me?

Best regards
Wolfgang