Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在编写代码,它可以通过 ODBC 执行 SQL 查询。
为此,我正在运行SQLExecDirect(),然后SQLExtendedFetch()获取结果列。
SQLExecDirect()
SQLExtendedFetch()
INSERT但是,诸如等语句UPDATE没有返回列,SQLExtendedFetch并以错误代码结束。
INSERT
UPDATE
SQLExtendedFetch
问题是:如何从查询中确定这种查询是否有返回列?
Edit:忘了提一下,对于查询,不应该有返回列 SQLGetDiagRec() 返回空错误消息(我已经在 MS SQL 驱动程序上测试过)。
Edit
调用 SQLNumResultCols,如果它显示 0,则表示没有结果集。