ERROR:ORA-12899
-
- Posts: 8
- Joined: Tue 02 Mar 2010 08:46
ERROR:ORA-12899
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
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
-
- Posts: 8
- Joined: Tue 02 Mar 2010 08:46
Re: ERROR:ORA-12899
please help me,thanks.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
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
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
-
- Posts: 8
- Joined: Tue 02 Mar 2010 08:46
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
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
-
- Posts: 8
- Joined: Tue 02 Mar 2010 08:46
-
- Posts: 8
- Joined: Tue 02 Mar 2010 08:46
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
)
(
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
)
-
- Posts: 8
- Joined: Tue 02 Mar 2010 08:46
-
- Posts: 8
- Joined: Tue 02 Mar 2010 08:46
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"
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"
-
- Posts: 8
- Joined: Tue 02 Mar 2010 08:46
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
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
-
- Devart Team
- Posts: 925
- Joined: Thu 17 Nov 2005 10:53
-
- Devart Team
- Posts: 925
- Joined: Thu 17 Nov 2005 10:53