unidac报ora-12899

laowu1215 2010-03-02 03:18:56
使用unidac 3.00.0.6 版本,连接数据库Oracle Database 11g Enterprise Edition 11.1.0.6.0 ,使用中文字符集:ZHS16GBK,进行SQL insert操作,提示ora-12899,具体如下:
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)
注:colltime数据库中定义varchar2(6)
请各位大虾帮忙看看,谢谢
...全文
403 12 打赏 收藏 转发到动态 举报
写回复
用AI写文章
12 条回复
切换为时间正序
请发表友善的回复…
发表回复
Henry.6 2011-03-22
  • 打赏
  • 举报
回复
升级到3.5看看
Alessandro_ 2011-03-21
  • 打赏
  • 举报
回复
[Quote=引用 9 楼 byteh 的回复:]
如果确定是长度问题,数据库可修改的话就修改表结构吧!

没必要管他是谁的bug
[/Quote]

我在我们那系统也出现这种问题,说超过了最大值,实际值为101,最大值为100

但是我把它最大值修改成120,结果还是报错了,跟踪出来实际值为121,最大值为120.
laowu1215 2010-03-10
  • 打赏
  • 举报
回复
没用的,改了结构又报其他错误
byteh 2010-03-10
  • 打赏
  • 举报
回复
如果确定是长度问题,数据库可修改的话就修改表结构吧!

没必要管他是谁的bug
laowu1215 2010-03-10
  • 打赏
  • 举报
回复
测试UniDAC version 3.00.0.7 ,错误依旧
params的size如下图:
laowu1215 2010-03-06
  • 打赏
  • 举报
回复
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

这应是BUG,正在期待新的版本下载。。。。。。
laowu1215 2010-03-05
  • 打赏
  • 举报
回复
dbmonitor监控结果:
2010/3/4 17:50:14 0.016 SQL Unprepare: insert into T_CollectJobState (Lsh,Collrq,CollTime,CollectBox,RealRecNum,CollRecNum,headNum,roadNum,unsucNum,NonRec,TestNum,State,jsjh,czyh,pt)
:lsh(WideString[6])='123456'
:collrq(WideString[8])='20100301'
:colltime(WideString[6])='120000'
:CollectBOx(WideString[8])='00001000'
:RealRecNum(Integer)=1000
:jsjh(WideString[2])='99'
:czyh(WideString[3])='001' Complete
2010/3/4 17:50:14 0.000 Disconnect: ***@***.***.***.***:1521:***** Complete
2010/3/4 17:50:14 0.171 Connect: ***@***.***.***.***:1521:***** Complete
2010/3/4 17:50:14 0.000 SQL Prepare: insert into T_CollectJobState (Lsh,Collrq,CollTime,CollectBox,RealRecNum,CollRecNum,headNum,roadNum,unsucNum,NonRec,TestNum,State,jsjh,czyh,pt)
Values(:lsh,:collrq,:colltime,:CollectBOx,:RealRecNum,0,0,0,0,0,0,0,:jsjh,:czyh,1)
:lsh(WideString[6])='123456'
:collrq(WideString[8])='20100301'
:colltime(WideString[6])='120000'
:CollectBOx(WideString[8])='00001000'
:RealRecNum(Integer)=1000
:jsjh(WideString[2])='99'
:czyh(WideString[3])='001' Complete
2010/3/4 17:50:14 1.014 SQL Execute: insert into T_CollectJobState (Lsh,Collrq,CollTime,CollectBox,RealRecNum,CollRecNum,headNum,roadNum,unsucNum,NonRec,TestNum,State,jsjh,czyh,pt)
Values(:lsh,:collrq,:colltime,:CollectBOx,:RealRecNum,0,0,0,0,0,0,0,:jsjh,:czyh,1)
:lsh(WideString[6])='123456'
:collrq(WideString[8])='20100301'
:colltime(WideString[6])='120000'
:CollectBOx(WideString[8])='00001000'
:RealRecNum(Integer)=1000
:jsjh(WideString[2])='99'
:czyh(WideString[3])='001'
starluck 2010-03-03
  • 打赏
  • 举报
回复
应该是字符宽度的问题,

params的size 是多少?
火龙岛主 2010-03-03
  • 打赏
  • 举报
回复
字符集不匹配,注意2010中的string类型均为widestring类型。
laowu1215 2010-03-02
  • 打赏
  • 举报
回复
不是全角,我怀疑是unidac问题,因为我使用UniConnection,直接连接数据库,就报这个错误;
不直接连接oracle,通过oracle的服务连接名连接,没有问题
亮剑_ 2010-03-02
  • 打赏
  • 举报
回复
字段超长,长度为6,实际为8
'120000'里不会有全角字符吧
laowu1215 2010-03-02
  • 打赏
  • 举报
回复
注:使用的delphi2010
Devart UniDAC v5.3.10 Full Source 5.3.10 31-Jul-14 -The EmptyTable method is added to TUniTable -The SQL property is added to TUniConnection -Support for the Upper and Lower statements in TDADataSet.Filter is added -Support for the ftOraTimeStamp type in TVirtualTable is added -Bug with reopening TDADataSet after BreakExec is fixed -Bug with processing calculated and lookup fields in the SmartFetch mode is fixed -Bug with getting RecordCount when QueryRecordCount is True is fixed -Bug with AV failure on opening TCustomDADataSet when Range was set is fixed -Bug with "Invalid field size" in TVirtualTable is fixed -Bug with AV failure on freeing objects on mobile platforms is fixed -Several bugs in the SmartFetch mode are fixed Oracle data provider -Data type mapping from RAW(16) to ftGuid is added -Now result parameter detection in UniConnection.ExecSQL is similar to the one in ODAC -Bug with connection establishing if the client has negative half-hour time zone is fixed -Bug with transactions in the OCI7 mode is fixed -Bug with tnsnames.ora parsing is fixed -Bug with parsing table names a if sub-query contains a WITH keyword is fixed SQLServer data provider -Bug with opening a query with too long columns is fixed -Bug with cutting an input-output parameter value is fixed -Bug with processing identity field is fixed -Bug with processing tinyint fields is fixed -Bug with processing tinyint and bigint parameters in SQL Server Compact Edition is fixed -Bug with the Integer Overflow error on query preparation when DescribeParams is True is fixed -Bug with getting metadata in MS SQL Server 64 bit is fixed MySQL data provider -Possibility to retrieve time values greater than 24:00:00 for a Time field is added -Bug in TMyDump with data backup in the Unicode mode is fixed InterBase data provider -The NoDBTriggers connection option is added -Bug with query execution when AutoPrepare = True is fixed PostgreSQL data provider -Bug with incorrect parsing of table names containing a "$" character is fixed
7.4.11 26-Nov-18 RAD Studio 10.3 Rio is supported Support of UPPER and LOWER functions for Unified SQL is added Bug with using the FieldOrigins property is fixed Bug with using the TrimFixedChar property is fixed Bug with saving a dataset that contains BLOB fields to XML is fixed Bug with the Refresh method of TVirualQuery is fixed Bug with handling BCD fields in TVirtualQuery is fixed Bug with updating fields which have data type mapping in TVirtualQuery is fixed Oracle data provider Oracle 18c is supported Implicit result sets in Oracle 12 are supported Bug with detecting time zone when connecting in the Direct mode is fixed Bug with using an extended string in DML statements in Oracle 12 is fixed Bug with using the IFILE option in TNSNAMES.ORA is fixed SQLServer data provider QuoteNames option in TUniLoader to escape field names is added Bug with mapping a TEXT field to ftWideMemo in Delphi is fixed Bug with SQL statements containing a CONTAINS predicate in the WHERE clause is fixed Bug with application freezing when executing a stored procedure is fixed Bug with editing the ConnectString property in TUniConnection in design-time editor is fixed Bug with XML field types when clearing data is fixed Bug with setting "MSOLEDBSQL.1" value for the TUniConnection.ConnectString property is fixed MySQL data provider Support for PAM and Windows authentications is added Bug in TUniDump with backuping stored procedures in MySQL 8 is fixed Bug with describing binary fields is fixed InterBase data provider Possibility to write large blobs by pieces is added PostgreSQL data provider PostgreSQL 11 is supported SQLite data provider Support for the BreakExec method in the Query component is added Bug in TUniDump with dumping national characters when UseUnicode is True is fixed ASE data provider Bug with AssignConnect is fixed MongoDB data provider Bug with re-setting a query for the Query component is fixed DBF data provider Detection of the file format when the DBFFormat option is set to dfAuto is improved Work with databases which contain a large number of files is improved Bug with incorrect query result when using local indexes is fixed Bug with mapping DATE fields is fixed BigCommerce data provider OAuth authentication is supported
7.4.11 26-Nov-18 RAD Studio 10.3 Rio is supported Support of UPPER and LOWER functions for Unified SQL is added Bug with using the FieldOrigins property is fixed Bug with using the TrimFixedChar property is fixed Bug with saving a dataset that contains BLOB fields to XML is fixed Bug with the Refresh method of TVirualQuery is fixed Bug with handling BCD fields in TVirtualQuery is fixed Bug with updating fields which have data type mapping in TVirtualQuery is fixed Oracle data provider Oracle 18c is supported Implicit result sets in Oracle 12 are supported Bug with detecting time zone when connecting in the Direct mode is fixed Bug with using an extended string in DML statements in Oracle 12 is fixed Bug with using the IFILE option in TNSNAMES.ORA is fixed SQLServer data provider QuoteNames option in TUniLoader to escape field names is added Bug with mapping a TEXT field to ftWideMemo in Delphi is fixed Bug with SQL statements containing a CONTAINS predicate in the WHERE clause is fixed Bug with application freezing when executing a stored procedure is fixed Bug with editing the ConnectString property in TUniConnection in design-time editor is fixed Bug with XML field types when clearing data is fixed Bug with setting "MSOLEDBSQL.1" value for the TUniConnection.ConnectString property is fixed MySQL data provider Support for PAM and Windows authentications is added Bug in TUniDump with backuping stored procedures in MySQL 8 is fixed Bug with describing binary fields is fixed InterBase data provider Possibility to write large blobs by pieces is added PostgreSQL data provider PostgreSQL 11 is supported SQLite data provider Support for the BreakExec method in the Query component is added Bug in TUniDump with dumping national characters when UseUnicode is True is fixed ASE data provider Bug with AssignConnect is fixed MongoDB data provider Bug with re-setting a query for the Query component is fixed DBF data provider Detection of the file format when the DBFFormat option is set to dfAuto is improved Work with databases which contain a large number of files is improved Bug with incorrect query result when using local indexes is fixed Bug with mapping DATE fields is fixed BigCommerce data provider OAuth authentication is supported
Unidac_Pro_v8.0.1 RAD Studio 10.3 Rio is supported Support of UPPER and LOWER functions for Unified SQL is added Bug with using the FieldOrigins property is fixed Bug with using the TrimFixedChar property is fixed Bug with saving a dataset that contains BLOB fields to XML is fixed Bug with the Refresh method of TVirualQuery is fixed Bug with handling BCD fields in TVirtualQuery is fixed Bug with updating fields which have data type mapping in TVirtualQuery is fixed Oracle data provider Oracle 18c is supported Implicit result sets in Oracle 12 are supported Bug with detecting time zone when connecting in the Direct mode is fixed Bug with using an extended string in DML statements in Oracle 12 is fixed Bug with using the IFILE option in TNSNAMES.ORA is fixed SQLServer data provider QuoteNames option in TUniLoader to escape field names is added Bug with mapping a TEXT field to ftWideMemo in Delphi is fixed Bug with SQL statements containing a CONTAINS predicate in the WHERE clause is fixed Bug with application freezing when executing a stored procedure is fixed Bug with editing the ConnectString property in TUniConnection in design-time editor is fixed Bug with XML field types when clearing data is fixed Bug with setting "MSOLEDBSQL.1" value for the TUniConnection.ConnectString property is fixed MySQL data provider Support for PAM and Windows authentications is added Bug in TUniDump with backuping stored procedures in MySQL 8 is fixed Bug with describing binary fields is fixed InterBase data provider Possibility to write large blobs by pieces is added PostgreSQL data provider PostgreSQL 11 is supported SQLite data provider Support for the BreakExec method in the Query component is added Bug in TUniDump with dumping national characters when UseUnicode is True is fixed ASE data provider Bug with AssignConnect is fixed MongoDB data provider Bug with re-setting a query for the Query component is fixed DBF data provider Detection of the file format when the DBFFormat option is set to dfAuto is improved Work with databases which contain a large number of files is improved Bug with incorrect query result when using local indexes is fixed Bug with mapping DATE fields is fixed BigCommerce data provider OAuth authentication is supported

5,388

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 开发及应用
社区管理员
  • VCL组件开发及应用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧