ADO corrupts date time values in where clause



We have a propreitary application similar to VB that uses ADO for
talking to an Oracle database. We use ORaoledb.oracle as the provider.

At times we are getting error messages like "Row cannot be located for
updating" and sometimes ORA-01841 Invalid date.

This error does not happen to all the users. But once it starts
occuring for a user, it's persistent till the time user logs out and
logs back into the application.

We were able to do an oracle trace and identify the sql statements that
were causing this.

In some cases we see that the year component of a date field in the
where clause being chopped off. This happens only in fields where date
is 30-DEC-1899.
(ie) instead of passing 1899-12-30 09:30:00 it passes -12-30 09:30:00.
This throws the invalid date format error.

Also in some cases the time component seems to be offset by 10 secs
(ie) In the database if the time component of a date field is 00:00:00,
ado passes 00:00:10 in the where clause. Thus causing the unable to
locate row error.

Now all these are in the where clause.Since the where clause is
something that ADO builds, we are at a loss as to what's going on.

The values for the same fields (used in the set protion of the update)
passed from the application are in correct format.

Any ideas or thoughts welcome.

.



Relevant Pages

  • Re: Message to Bill Vaughn
    ... sensitive as COM-based ADO. ... the customer decided to put the application on a Windows ... > 2000 platform in addition to the NT platform. ... > the Oracle database to 9i. ...
    (microsoft.public.data.ado)
  • Message to Bill Vaughn
    ... The Oracle database is maintained by a third ... the customer decided to put the application on a Windows ... 2000 platform in addition to the NT platform. ... the developer changed the controls from RDO to ADO. ...
    (microsoft.public.data.ado)
  • Re: adCriteriaAllCols and text columns
    ... The text, ntext, and image data types cannot be compared or sorted, except ... However, with ADO ... > clause whereas the BDE would use all columns in the where clause. ... > notes and posts the changes whilst user2 is looking at the original notes. ...
    (borland.public.delphi.database.ado)
  • adCriteriaAllCols and text columns
    ... I've figured out this is because ADO defaults to ... clause whereas the BDE would use all columns in the where clause. ... Then user2 decides to add to the notes and posts them. ...
    (borland.public.delphi.database.ado)
  • Re: Deleting Multiple Rows
    ... Yes - AND - being *able* to put it in the WHERE clause is very different ... updates, and deletes) are cached. ... was to create a loop in my application - wrap the loop in an ADO ... the lesser evil relative to the old nasty ADO .UpdateBatchmethod... ...
    (microsoft.public.sqlserver.programming)