Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.
Have you seen this error in your programs for ADO.Net and ADODB?
How much time would you spend to find and eliminate the problem? A WHOLE DAY or maybe a WEEK? When you see this text, you have no idea what to search for!
The situation will be even worse if this error occurs randomly and the client with the installed program is far from you.
According to our statistics, most errors of this type are related to reading and conversion of column values.
To save your time, we took this fact into account in the new version IBProvider Professional and developed a special mechanism to make error messages more self-descriptive.
Now, instead of old non-descriptive messages you will receive specific messages with column number and status that will allow to solve the problem FASTER:
The following is a small example of how to model the situation:
option explicit dim cn dim rs set cn=createobject("ADODB.Connection") cn.Provider="LCPI.IBProvider.3" cn.Properties("location") ="localhost:d:\database\ibp_test_fb25_d3.gdb" cn.Properties("user id") ="SYSDBA" cn.Properties("password") ="masterkey" cn.Properties("ctype") ="win1251" cn.Properties("ctype_none") ="win1251" cn.Properties("auto_commit") =true wscript.echo "point #001 (insert win2151 into NONE-column)" wscript.echo "" call cn.Open() call cn.Execute("RECREATE TABLE TEST_NONE (COL_NAME_WITH_NONE_ENC VARCHAR(128) CHARACTER SET NONE)") call cn.Execute("INSERT INTO TEST_NONE (COL_NAME_WITH_NONE_ENC) VALUES (_none 'русский текст (russian text)')") set rs=cn.Execute("select * from TEST_NONE") wscript.echo "str:"&rs(0).value set rs=nothing call cn.Close() wscript.echo "" wscript.echo "point #002 (select NONE-column with win1251 text as unicode_fss text)" wscript.echo "" cn.Properties("ctype") ="unicode_fss" cn.Properties("ctype_none") ="unicode_fss" call cn.Open() set rs=cn.Execute("select * from TEST_NONE") dim v on error resume next v=rs(0).Value wscript.echo "GENERAL ERROR SOURCE:"&err.Source wscript.echo "GENERAL ERROR DESCR:"&err.Description wscript.echo "GENERAL ERROR CODE:"&err.Number on error goto 0 wscript.echo dim i for i=0 to cn.Errors.Count-1 wscript.echo "--- PROVIDER ERROR: "&cstr(i+1) wscript.echo "Source : "&cn.Errors.Item(i).Source wscript.echo "Description : "&cn.Errors.Item(i).Description wscript.echo "Code : "&cn.Errors.Item(i).Number wscript.echo "SQLState : "&cn.Errors.Item(i).SQLSTATE wscript.echo "NativeError : "&cn.Errors.Item(i).NativeError next set rs=nothing call cn.Close()
Output:
point #001 (insert win2151 into NONE-column) str:русский текст (russian text) point #002 (select NONE-column with win1251 text as unicode_fss text) GENERAL ERROR SOURCE:LCPI.IBProvider.3 GENERAL ERROR DESCR:Failed to obtain column data [number: 1][COL_NAME_WITH_NONE_ENC]. Status: DBSTATUS_E_CANTCONVERTVALUE. GENERAL ERROR CODE:-2147217913 --- PROVIDER ERROR: 1 Source : LCPI.IBProvider.3 Description : Failed to obtain column data [number: 1][COL_NAME_WITH_NONE_ENC]. Status: DBSTATUS_E_CANTCONVERTVALUE. Code : -2147217913 SQLState : NativeError : 2253
In addition to self-descriptiveness of messages, the new IBProvider Professional Edition has:
- Enhanced caching of metadata when working with column values
- Optimized usage of memory for metadata
- Enhanced work with OCTET blobs (FB2.1, FB2.5)
- A few bugs was fixed. We recommended upgrade to new version