Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

01S07: Adaptive Server may round or truncate nanosecond values

486 views
Skip to first unread message

panoskonstantinidis

unread,
Feb 14, 2008, 4:40:21 AM2/14/08
to
Hello, we are using sybase as our database server and while
the application is running we are getting the following
warning in the logs:

SQLWarning ignored: SQL state '01S07', error code '0',
message [01S07: Adaptive Server may round or truncate
nanosecond values]

Normally I wouldn't worry since it's just a warning, but it
is being logged every fraction of a second and the logs
files are getting very big. I did a search on the forums and
I found that the solution to this problem is to use the
latest sybase driver
(http://newsgroupstats.info/article/forums.sybase.com/sybase.public.jconnect50/7241/java-sql-SQLWarning-01S07-Adaptive-Server-may-round-or-truncate-nanosecond-values.html).
I tried using the latest jconn3 jar but to no avail.

Any ideas if there is something else I can do?

Regards

Panos

Paul

unread,
Feb 14, 2008, 12:08:03 PM2/14/08
to
This happens when using SybTimestamp.

If you could change your warning handler to ignore the 01S07 then you won't
get it logged.
Otherwise you could log a Tech Support case with Sybase to see if something
can be done to
change this. Not sure what it would be - maybe supress the warning, if you
can live with the
rounded values.

-Paul

<Panos Konstantinidis> wrote in message
news:47b40c85.223...@sybase.com...

J

unread,
Feb 14, 2008, 1:27:11 PM2/14/08
to
On 14 Feb 2008 09:08:03 -0800, "Paul" <Pa...@sybase.com> wrote:

The SQLWarning is the correct thing for jConnect to do as the spec.
says it should throw a SQLWarning when the conversion from a timestamp
to a datatime will lose the nanosecs.

Timestamp ts = new Timestamp(System.currentTimeMillis());

if ( loseNanos)
ts.setNanos(0);

I think this should avoid getting the warning.

J

0 new messages