Informix OIC++ :查询产生错误 MI_LIB_USAGE / 参数(客户端库错误)为 NULL
使用 Informix C++ 接口,第一个查询没问题,但第二个查询会产生此错误
MI_LIB_USAGE: XIX000:-7520:Argument (client library error) is NULL.
我的代码
// connection okay and open
ITQuery query(conn);
string qtext;
qtext = "SELECT * FROM transit_kunde_s WHERE erledigt='N'";
okay = query.ExecForIteration(qtext.c_str());
ITRow *row;
while (row = query.NextRow()) {
// do stuff
// now update that row
qtext = "UPDATE transit_kunde_s SET erledigt='Y' WHERE transitkunde='"+ts+"'";
code = query.ExecForStatus(qtext.c_str());
// ERROR
}
有什么想法吗?
Using Informix C++ interface, the first query is fine, but the second yields this error
MI_LIB_USAGE: XIX000:-7520:Argument (client library error) is NULL.
My code
// connection okay and open
ITQuery query(conn);
string qtext;
qtext = "SELECT * FROM transit_kunde_s WHERE erledigt='N'";
okay = query.ExecForIteration(qtext.c_str());
ITRow *row;
while (row = query.NextRow()) {
// do stuff
// now update that row
qtext = "UPDATE transit_kunde_s SET erledigt='Y' WHERE transitkunde='"+ts+"'";
code = query.ExecForStatus(qtext.c_str());
// ERROR
}
Any ideas why?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
解决方案是使用新的查询对象:
编辑:如果想要启用事务,则必须使用新的连接!请参阅[http://stackoverflow.com/questions/5095519/how-to-use-transactions-in-informix-csdk]
solution is to use a fresh query object:
EDIT: And if one want transaction enabled one has to use a fresh connection! See [http://stackoverflow.com/questions/5095519/how-to-use-transactions-in-informix-csdk]