[DUG] Heres one for the ADO guys
Robert martin
rob at chreos.co.nz
Mon Apr 7 11:06:34 NZST 2008
Hi
I will answer my own question :)
I put the following after each execute of the QDO statement and it seems
to fix the problem (a bit of a pain and performance issue however).
for Counter := 0 to uQ.Parameters.Count - 1 do begin
uQ.Parameters[Counter].Value := Null;
end;
uQ is the update Query.
Rob Martin
Software Engineer
phone +64 03 377 0495
fax +64 03 377 0496
web www.chreos.com
Wild Software Ltd
Robert martin wrote:
> Hi
>
> I have an app that copies data from a Firebird DB to an access (or any
> other ODBC) DB. I have a master SQL that runs on a FB DB (using
> IBObjects native components). I create a TADOQuery component which I
> load with an Insert query (something like insert into x (a, b) values
> (:a, :b). The master has fields named a, b etc.
> I set the mastersource to the FB queries datasource and run the insert
> query once for each record in the master.
>
> This works a treat. However something has changed !
>
> The problem I am now having is that if some of the values in the
> master are NULL (as they often are) then the insert is not inserting
> NULL, it is inserting the last non null value loaded.
>
> How do I get around this? I know if I was 'manually' loading the data
> via code I could load the params with Nulls where required, but I am
> relying on the master detail link for the data.
>
> Is there perhaps some setting I am missing? (I assume the change is
> occuring due to an update of Delphi, OS or IBObjects components).
>
More information about the Delphi
mailing list