PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: Michael Peppler <mpeppler at MBAY dot NET>
Subject: Re: DBD::Sybase 0.06: Strange errors with Datetime fields
Date: Dec 9 1997 4:03PM

Tim Bunce wrote:
> 
> > From: Lars Brueckner 
> >
> > Hi there,
> >
> > I'm using perl5.004_01 with DBI 0.90 & DBD::Sybase 0.06 to connect
> > to a Sybase 11 Server on the same machine (Solaris).
> >
> > I've set PrintError=>1 upon connection.
> >
> > I'm generating some inserts which contain Datetime values, and I
> > get I lot of Messages like:
> >
> > >Server message:
> > >Message number: 249, Severity 16, State 1, Line 1
> > >Message String: Syntax error during implicit conversion of VARCHAR >value '"19971213 13:12"' to a DATETIME field.
> >
> > >Server message:
> > >Message number: 249, Severity 16, State 1, Line 1
> > >Message String: Syntax error during implicit conversion of VARCHAR >value 'dateadd(mi,3,"19971213 13:12")' to a DATETIME field.
> >
> > However the inserts are executed properly
> 
> With the right value in that field?
> 
> > and I get no such message if I execute them with sqsh.
> >
> > How do I tell DBI/DBD::Sybase that only fatal errors should be printed?
> 
> Sounds like a driver buglet. Generally an error should only be flagged
> (in $h->err and $DBI::err) when the method call actually 'fails'.

The 'severity' of 16 in the error message actually means that
the error is fatal for that SQL statement. Any error with a
severity over 10 fails the statement.

Now as to why the conversion fails is another problem, because that
conversion should work, and does work here.

Lars - do you have any special setting for your datetime formats
(something like "set dateformat xyz")?

Michael
-- 
Michael Peppler       -||-  Data Migrations Inc.
mpeppler@datamig.com  -||-  http://www.mbay.net/~mpeppler