ADO corrupts date time values in where clause
- From: "sathya" <sathyagiri@xxxxxxxxx>
- Date: 17 Nov 2006 13:40:50 -0800
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.
.
- Follow-Ups:
- Re: ADO corrupts date time values in where clause
- From: Bob Barrows [MVP]
- Re: ADO corrupts date time values in where clause
- Prev by Date: Re: URGENT !!! Operation must use an updateable quary
- Next by Date: Re: CursorLocation for Execute Method
- Previous by thread: Locks and ADO
- Next by thread: Re: ADO corrupts date time values in where clause
- Index(es):
Relevant Pages
|