Up Prev Next
From: "pang khong lin" <klpang at hotmail dot com>
Subject: Re: updating of record
Date: Sep 16 1998 12:54AM
You are right, putting double qoutes does solve some of the problem. For
the data types that are INT, there should not be any double qoutes and
it worked even if the field is empty. In addition, CHAR is not a problem
as long it is in double quote. But other data field like DATETIME and
MONEY would need to insert double quotes and following the format ( that
one chose ) exactly.
Like "MM/DD/YYYY HH:MM:SS" or "00.00".
Hope this would help other newbies like me . . . and thanks Michael.
>pang khong lin writes:
> > hi all,
> > I am trying to insert a record to a database (Sybase) through a CGI
> > script and i receive a lot of error message concerning error in data
> > type. I managed to play around with the format of the data to 'suit'
> > data type but still encounter some error message.
> > For exp: Certain field of the record are empty or can be empty and
> > seem that perl treat an empty field as a char.
> > If anyone has come across these kind of problem, please advise.
>You're going to have to be a lot more specific than that if you want
>to get a coherent answer.
>Please provide some source code (as small as you can make it to still
>illustrate the problem) and a typical data set that causes the
>(off hand I would guess that you are placing quotes in the insert()
>statement where there shouldn't be any, or vice-versa...)
>Michael Peppler -||- Data Migrations Inc.
>firstname.lastname@example.org -||- http://www.mbay.net/~mpeppler
>Int. Sybase User Group -||- http://www.isug.com
Get Your Private, Free Email at http://www.hotmail.com