🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #16976

Problem saving Timestamp Datatypes back to Sybase Database

#16976
From: Dawn Snow
Date: Thu, 07 Jan 1999 00:00
37 lines
1892 bytes
I have a JBuilder 2.0 application that reads DateTime fields from a
Sybase Database.  The data is resolved back to the database using the
post and save buttons on the Navigator Control bar.  However, when I
click on the save button, I get the following error message:

[INTERSOLV][ODBC SQL Server driver][SQL Server] Syntax error during
implicit conversion of CHAR value '1998-11-25 00:00:00.000000000' to a
DATETIME field.

The datetime column is read into JBuilder as a TIMESTAMP datatype.

Does anyone know what is going on here, and if so is there a way to fix
this problem?  The editmask and displaymask on the column are set to
M/d/yy, but somehow during the update, the columns that are assigned as
timestamp values are converted to this obscure format, which is too long

to work with the update command.  I have tried changing the precision of

the column among many other things but nothing works.  I get this same
error message if I enter the SQL update command manually with the same
date format.  However, if I reduce the date format to 23 characters
instead of 29 it works fine.  Sybase sets a limit of 23 characters on
DATETIME fields, so the TIMESTAMP value assigned by JBuilder is too
long.

Any help would be greatly appreciated.

Thanks,

--
Dawn Snow

CCIT
Medical University of South Carolina
Phone: 843-792-5470
Fax: 843-792-8319
email: snowrd@musc.edu
Technical Details
Message-ID: <36953EAE.CDAE907C@musc.edu>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,67ed2be7291b3c78,start
X-Google-Attributes: gidf74b3,public
From: Dawn Snow <snowrd@musc.edu>
Subject: Problem saving Timestamp Datatypes back to Sybase Database
Date: 1999/01/07
Message-ID: <36953EAE.CDAE907C@musc.edu>
X-Deja-AN: 429917335
Content-Transfer-Encoding: 7bit
Organization: CCIT
Content-Type: text/plain; charset=us-ascii
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.java.language