Today, the data is inserted into the PG database through the ADO interface, and the result data is never inserted into the table of the database, and after the INSERT statement is executed, the error code Db_e_dataoverflow is returned.
Db_e_dataoverflow: The value in the command exceeds the range specified in the column!
The reason is clear that the range of variable values for the fields in the inserted data table exceeds the scope of the table definition, resulting in an overflow.
A good programming habit: It is best to allocate large enough buffer space when defining string types .
In addition, in the case of switching between Chinese and English, the length of the string is shorter, but the length of the translation into English may be significantly increased, you need to choose the maximum length of the two!
Appendix: OLE DB Functions may return an HRESULT error code
Error code Description
Db_e_abortlimitreached execution interrupt, possibly due to insufficient resources db_e_alreadyinitialized attempt to reinitialize an already initialized data source db_e_badaccessorflags illegal accessor tag Db_e_badaccessorhandle illegal accessor handle db_e_badaccessortype specified accessor without parameter db_e_badbindinfo illegal binding information Db_e_badbookmark Illegal bookmark Db_e_badchapter Illegal chapter db_e_badcolumnid Illegal column number Db_e_badcompareop comparison operation invalid Db_e_badconvertflag illegal conversion token db_e_badcopy copy Error Db_e_baddynamicerrorid passed Dynamicerrorid illegal Db_e_badhresult pass the HRESULT illegal DB_E_BADID unacceptable Db_e_badid, use Db_e_ableid DB_ E_badlockmode illegal locking mode db_e_badlookupid illegal lookupid db_e_badordinal The specified column parameter does not exist Db_e_badparametername does not recognize the given parameter name DB_E_ Badprecision the specified precision illegal Db_e_badpropertyvalue property value illegal db_e_badratio illegal proportion db_e_badrecordnum The specified record number is illegal db_e_badregionhandle An illegal zone handle db_e_badrowhandle an illegal line handle. This error often occurs at the beginning and end of a row recordset, or when updating a result set. Db_e_badscale the specified scale illegal db_e_badsourcehandle the illegal source handle db_e_badstartposition The specified line offset out of bounds Db_e_badstatusvalue The specified status token is neither DBCOLUMNSTATUS_OK nor Dbcolumnstatus_isnull Db_e_badstorageflag does not support a specified storage token db_e_badstorageflags does not support storage tagging DB_ E_badtableid Illegal table ID db_e_badtype The specified type is illegal db_e_badtypename the given type does not recognize db_e_badvalues illegal value db_e_bookmarkskipped Although the bookmark is formed correctly, there is no matching row db_e_b Yrefaccessornotsupported the supply program does not support accessordb_e_canceled modification has been revoked, the number of columns has not changed Db_e_cannotfree the provider is already the owner of the tree, the tree cannot be released Db_e_cannot RESTART rowset cannot be restarted db_e_cantcancel executing command cannot be canceled db_e_cantconvertvalue the value in the command cannot be converted to the correct type because of a non-numeric overflow reason DB_E_ CANTFETCHBACKWARDS rowset does not support backward scrolling Db_e_cantfilter requested filter cannot open Db_e_cantorder requested sequencer cannot be opened DB_E_CANTSCROLLBACKWARDS rowset cannot roll back DB _e_canttranslate cannot describe the current number as a text db_e_chapternotreleased rowset is a single chapter, when accessing a new chapter, the old chapter does not release the DB_E_CONCURRENCYVIOLATION rowset using optimized parallel operations. column values have changed since last read Db_e_costlimit cannot find a query plan within a given cost limitthe value in the Db_e_dataoverflow command exceeds the range specified in the columnDb_e_deletedrow the referenced row has been removed db_e_dialectnotsupported the provider does not support the specified dialect Db_e_duplicatecolumnid a duplicate column label has occurred DB_E_ Duplicatedatasource a duplicate data source DB_E_DUPLICATEINDEXID The specified index already exists
ADO Error Reference: https://msdn.microsoft.com/zh-cn/LIBRARY/jj248997.aspx
OLE DB
function may return the
HRESULT
Error code
ADO Call execute failed with exception code Db_e_dataoverflow