SQL Error: conversion error from string "0"

In this forum we will discuss things relating the ZEOSLib 6.6.x stable versions

Moderators: gto, EgonHugeist

Post Reply
louis
Expert Boarder
Expert Boarder
Posts: 109
Joined: 02.01.2009, 19:41

SQL Error: conversion error from string "0"

Post by louis »

Hallo,
I have this error message:
SQL Error: conversione error from string "0". Error Code: -413. Overflow occurred during datatype conversion.

I use delphi 5 with zeos 6.6.4.

I need to use a TTimeField that can have 0.00 time inside but when I try to save the query, I have the error above in unit ZDbcInterbase6Utils.

I understand this is because the time is empty but what I do to solve this problem?

Thanks.
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

Hi,

Can you please file a bug report on the bug tracker? ( http://zeosbugs.firmos.at/ ) Please attach a minimal project showing the error and the script needed to set up the database.

Mark
Image
louis
Expert Boarder
Expert Boarder
Posts: 109
Joined: 02.01.2009, 19:41

Post by louis »

mdaems wrote:... Please attach a minimal project showing the error and the script needed to set up the database.
Hi Mark,

while I prepared the example I have uncovered where I mistook. :oops:
During create table in database I assigned wrong default, see wrong code:

Code: Select all

CREATE TABLE CEDOLINI
(
  ID_CEDOLINO Integer NOT NULL,
  GIORNO1 Time DEFAULT 0 NOT NULL, <--- ERROR
  PRIMARY KEY (ID_CEDOLINO)
);
but the line correct is:

Code: Select all

  GIORNO1 Time DEFAULT '00.00' NOT NULL, <--- CORRECT!
Thanks
Post Reply