【发布时间】:2011-11-11 16:52:04
【问题描述】:
我正在使用 VS 2008。在对 sql db 表的函数调用中,我有
boost::scoped_ptr<sql::PreparedStatement> pstmt( conn->prepareStatement(query) );
boost::scoped_ptr<sql::ResultSet> prow( pstmt->executeQuery() );
查询看起来不错,如果我复制它并在mySql 工作台中运行它,我会得到一条记录。
但是prow( pstmt->executeQuery()扔了sql::InvalidArgumentException
如果我点击继续,我会得到Unhandled exception ... Access violation reading location 0xfeeefef6
__CLR_OR_THIS_CALL ~basic_string()
{ // destroy the string
_Tidy(true);
}
在一个名为 xstring 的文件中。
我找到的最相关的是THIS
答案是将所有连接参数的string 更改为SQLString,但我不知道SQLString 需要什么头文件?
或者也许还有其他解决方案?
谢谢。
【问题讨论】:
-
在 cpp 中使用过 SQLString 的任何人都可以评论我需要什么头文件吗?
标签: c++ mysql invalidargumentexception