Re: ADO DB2 Exception Error

From: Arnie Mauer (xxx_at_nowhere.net)
Date: 08/24/04


Date: Tue, 24 Aug 2004 09:52:06 -0400


"Nigel Huband" <nhuband@nospam.hotmail.com> wrote in message
news:4129358f@newsgroups.borland.com...
> Hi, I'm maintaining some code that's throwing an exception on 'post'
> to a
> DB2 (UDB) table.
>
> It's using a Delphi TADOTable connecting through a TADOConnection
> object
> using the DB2 v7.1 drivers through ODBC.
>
> The strange thing is that it works on all other databases I've tried
> (SQL
> Server, Access, etc).
>
> It happens when the TADOTable has the 'append' method called, the
> data is
> then populated then on the 'post' the exception occurs.
>
> I think it might be related to a datetime variable being null as
> these
> values were not set.
>
> I don't suppose anybody else has had problems like this and might be
> able to
> point me in the right direction?
>
> Thanks in advance for all help.
>
> Regards,
> Nigel Huband.

I can't help directly. Maybe just moral support ;-)

First, I'd avoid using the table component if at all possible. We use
the query and/or dataset objects. Even with these objects, we always
use SQL rather than the edit, append, etc. modes. They didn't seem to
work correctly with DB2.

Check the FixPack level you're at. If I recall correctly, FP 5 for v7
was a real dog. We're currently using v8. Even with v8, FP1, IBM's
OLEDB provider still had bugs. Not to mention it was no faster than
using IBM's ODBC provider.

If you suspect a null datetime is the problem, try setting a valid
value in it if you can.

All in all, we found DB2 to be more troublesome to get working
properly then Oracle and SQL Server put together.

Good luck,

- Arnie



Relevant Pages

  • ADO DB2 Exception Error
    ... DB2 table. ... It's using a Delphi TADOTable connecting through a TADOConnection object ... then populated then on the 'post' the exception occurs. ...
    (borland.public.delphi.database.ado)
  • CommandTimeout with DB2 not working
    ... I'm using ADO to connect to a DB2 v8.1.5 db running on Linux RH 3.0. ... The problem I'm seeing is no exception is thrown when the command ... I then expect to catch an exception if the command takes longer than ...
    (microsoft.public.data.ado)