Hello, everybody!
I have found a bug in Informix C++ Object interface 2.5. The following piece
of code fails with -1213(Character to numeric conversion failed) error:
...
ITStatement stmt(conn);
stmt.Prepare("insert into test values (?)"); // create table test(v
smallfloat);
ITValue* pval;
pval = stmt.Param(0);
ITConversions* conv;
pval->QueryInterface(ITConversionsIID, (void**)&conv);
if (!conv->ConvertFrom(1.56))
{
cout << "Conversion error\\n";
}
conv->Release();
if (!stmt.Exec())
{
cout << "Error executing statement\\n";
}
pval->Release();
...
It comes up when executing prepared INSERT statements against database on
IDS730 which uses nondefault locale, RU_RU.CP1251 in my case, but I also
checked this with DE_DE.CP1252.
I can explain why C++I produces this error. If it is interesting, let me
know.
What I would like to know is does Informix plan to support this library in
the future or I will have to use some other interfaces, like LIBDMI?
Best regards
Dima