ERROR:ORA-12899

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
wushan1215
Posts: 8
Joined: Tue 02 Mar 2010 08:46

ERROR:ORA-12899

Post by wushan1215 » Fri 05 Mar 2010 14:14

i USED UNIDAC unidac3.00.0.6 IN DELPHI2010,BUT GET EROR ORA-12899:
delphi sql:oq2.Close ;
oq2.SQL.Text :='insert into T_CollectJobState (Lsh,Collrq,CollTime,CollectBox,RealRecNum,CollRecNum,headNum,roadNum,unsucNum,NonRec,TestNum,State,jsjh,czyh,pt)';
oq2.SQL.Add('Values(:lsh,:collrq,:colltime,:CollectBOx,:RealRecNum,0,0,0,0,0,0,0,:jsjh,:czyh,1)');
oq2.ParamByName('lsh').AsString :='123456';
oq2.ParamByName('collrq').AsString :='20100301';
oq2.ParamByName('colltime').AsString :='120000';
oq2.ParamByName('CollectBox').AsString :='00001000';
oq2.ParamByName('RealRecNum').Asinteger :=1000;
oq2.ParamByName('jsjh').AsString :='99' ;
oq2.ParamByName('czyh').AsString :='001' ;
oq2.Prepared:=true;
oq2.ExecSQL ;
ORA-12899: value too large for column “T_COLLECTJOBSTATE"."COLLTIME" (actual: 8, maximum: 6)

Ps:1)database Oracle Database 11g Enterprise Edition 11.1.0.6.0
2)colltime varchar2(6)
3)UniConnection1: TUniConnection
ProviderName = 'Oracle'
SpecificOptions.Strings = (
'Oracle.Direct=True'
'Oracle.Charset=ZHS16GBK'
'Oracle.UseUnicode=True')
Options.DisconnectedMode = True
Username = '****'
Password = '******'
Server = ******:*****:****'
LoginPrompt = False

wushan1215
Posts: 8
Joined: Tue 02 Mar 2010 08:46

Re: ERROR:ORA-12899

Post by wushan1215 » Fri 05 Mar 2010 14:16

wushan1215 wrote:UNIDAC unidac3.00.0.6 IN DELPHI2010,BUT GET EROR ORA-12899:
delphi sql:oq2.Close ;
oq2.SQL.Text :='insert into T_CollectJobState (Lsh,Collrq,CollTime,CollectBox,RealRecNum,CollRecNum,headNum,roadNum,unsucNum,NonRec,TestNum,State,jsjh,czyh,pt)';
oq2.SQL.Add('Values(:lsh,:collrq,:colltime,:CollectBOx,:RealRecNum,0,0,0,0,0,0,0,:jsjh,:czyh,1)');
oq2.ParamByName('lsh').AsString :='123456';
oq2.ParamByName('collrq').AsString :='20100301';
oq2.ParamByName('colltime').AsString :='120000';
oq2.ParamByName('CollectBox').AsString :='00001000';
oq2.ParamByName('RealRecNum').Asinteger :=1000;
oq2.ParamByName('jsjh').AsString :='99' ;
oq2.ParamByName('czyh').AsString :='001' ;
oq2.Prepared:=true;
oq2.ExecSQL ;
ORA-12899: value too large for column “T_COLLECTJOBSTATE"."COLLTIME" (actual: 8, maximum: 6)

Ps:1)database Oracle Database 11g Enterprise Edition 11.1.0.6.0
2)colltime varchar2(6)
3)UniConnection1: TUniConnection
ProviderName = 'Oracle'
SpecificOptions.Strings = (
'Oracle.Direct=True'
'Oracle.Charset=ZHS16GBK'
'Oracle.UseUnicode=True')
Options.DisconnectedMode = True
Username = '****'
Password = '******'
Server = ******:*****:****'
LoginPrompt = False
please help me,thanks.

tobias_cd
Posts: 56
Joined: Thu 18 Dec 2008 22:10

Post by tobias_cd » Sat 06 Mar 2010 06:38

Hi,
2 thoughts I have:
a) if you use Unicode generally in your DB, shouldn't your columns also have double the size, i.e. varchar2(12) instead of varchar2(6) etc.? This may not be an issue with this "colltime" column in this case, but maybe a general idea.
b) have you tried to use "simple" parameter names like ":a, :b, :c" etc. instead of the actual column names?
Regards,
Tobias

wushan1215
Posts: 8
Joined: Tue 02 Mar 2010 08:46

Post by wushan1215 » Sat 06 Mar 2010 08:47

thanks,New build of UniDAC version 3.00.0.7 is available for download now.
This version includes:
Ability to use Access system database added

Added DetectFieldsOnPrepare parameter for NexusDB ODBC driver

Added ability to send call stack information to the dbMonitor component

Fixed bug with refreshing record when using master/detail relationship

Fixed bug with LocalUpdate in the CachedUpdates mode

Fixed bug with displaying nvarchar2 fields when UseUnicode is true

Fixed bug with getting IndexFieldNames list in design time

Fixed several bugs with getting information about SQLite database using the TUniMetadata component

Fixed bug with processing TableInfo for SQLite

Fixed bug with DBMonitor for C++ Builder 6
Devart development team

wushan1215
Posts: 8
Joined: Tue 02 Mar 2010 08:46

Post by wushan1215 » Mon 08 Mar 2010 08:44

test UniDAC version 3.00.0.7,error: ora-12899
.........

wushan1215
Posts: 8
Joined: Tue 02 Mar 2010 08:46

Post by wushan1215 » Mon 08 Mar 2010 08:45

create table T_COLLECTJOBSTATE
(
LSH NVARCHAR2(15) not null,
COLLRQ NVARCHAR2(8) not null,
COLLTIME NVARCHAR2(6) not null,
COLLECTBOX NVARCHAR2(8) not null,
REALRECNUM NUMBER(8) default 0,
COLLRECNUM NUMBER(8) default 0,
HEADNUM NUMBER(5) default 0,
ROADNUM NUMBER(5) default 0,
UNSUCNUM NUMBER(5) default 0,
NONREC NUMBER(5) default 0,
JSJH NVARCHAR2(2) not null,
CZYH NVARCHAR2(10) not null,
STATE NUMBER(1) default 0,
TESTNUM NUMBER(5) default 0,
PT NUMBER(1) default 0
)

wushan1215
Posts: 8
Joined: Tue 02 Mar 2010 08:46

Post by wushan1215 » Mon 08 Mar 2010 08:54

nvarchar,varchar2,char,all datatype ,same error

wushan1215
Posts: 8
Joined: Tue 02 Mar 2010 08:46

Post by wushan1215 » Tue 09 Mar 2010 05:27

oq2.Close ;
oq2.SQL.Text :='insert into T_CollectJobState (Lsh,Collrq,CollTime,CollectBox,RealRecNum,CollRecNum,headNum,roadNum,unsucNum,NonRec,TestNum,State,jsjh,czyh,pt)';
oq2.SQL.Add('Values(:lsh,:collrq,:colltime,:CollectBOx,:RealRecNum,0,0,0,0,0,0,0,:jsjh,:czyh,1)');
oq2.ParamByName('lsh').AsInteger :=strtoint('123456');
oq2.ParamByName('collrq').Asinteger :=strtoint('20100301');
oq2.ParamByName('colltime').Asinteger :=strtoint('120000');
oq2.ParamByName('CollectBox').Asinteger:=strtoint('00001000');
oq2.ParamByName('RealRecNum').Asinteger :=1000;
oq2.ParamByName('jsjh').Asinteger :=strtoint('99') ;
oq2.ParamByName('czyh').Asinteger :=strtoint('001') ;
oq2.Prepared:=true;
oq2.ExecSQL ;
NOT USED ASSTRING ,WORK FINE,I THINK: THIS ERROR IN "VARCHAR2"

wushan1215
Posts: 8
Joined: Tue 02 Mar 2010 08:46

Post by wushan1215 » Wed 10 Mar 2010 13:25

http://www.devart.com/forums/viewtopic. ... 061a790399:

oq2.Close ;
oq2.SQL.Text :='insert into T_CollectJobState (Lsh,Collrq,CollTime,CollectBox,RealRecNum,CollRecNum,headNum,roadNum,unsucNum,NonRec,TestNum,State,jsjh,czyh,pt)';
oq2.SQL.Add('Values(:lsh,:collrq,:colltime,:CollectBOx,:RealRecNum,0,0,0,0,0,0,0,:jsjh,:czyh,1)');
oq2.Params.ParamValues['lsh']:=widestring('123456');
oq2.Params.ParamValues['collrq'] :=widestring('20100301');
oq2.Params.ParamValues['colltime']:=widestring('120000');
oq2.Params.ParamValues['CollectBox'] :=widestring('00001000');
oq2.Params.ParamValues['RealRecNum'] :=integer(1000);
oq2.Params.ParamValues['jsjh'] :=widestring('99');
oq2.Params.ParamValues['czyh'] :=widestring('001') ;
oq2.Prepared:=true;
oq2.ExecSQL ;


USE ODAC 6.90.0.55,ERROR ORA-01401,......
HELP,THANKS

Challenger
Devart Team
Posts: 925
Joined: Thu 17 Nov 2005 10:53

Post by Challenger » Thu 11 Mar 2010 14:21

We have reproduced this problem. And now we are investigating it. As soon as we get any results we will let you know.

Challenger
Devart Team
Posts: 925
Joined: Thu 17 Nov 2005 10:53

Post by Challenger » Fri 12 Mar 2010 13:37

We have fixed this problem. This fix will be included in the next build of UniDAC.

Post Reply