EXEC SQL DECLARE table_columns_cur1 CURSOR for
SELECT substr(A.name, 1, 50) as 列名, substr(A.typename, 1, 20) as 数据类型, char(A.length) as 长度,
CASE WHEN EXISTS(SELECT 1 FROM syscat.keycoluse B WHERE B.tabname=A.tbname AND B.colname=A.name)
THEN '1' ELSE '0' END AS 主键
FROM sysibm.syscolumns A WHERE upper(A.tbname)='HSMTBL' AND upper(A.tbcreator) ='UNMONS'
EXEC SQL OPEN table_columns_cur1;
if (sqlca.sqlcode < 0)
{
UnionUserErrLog("in UnionInitColumnNames:: open cursor err[%d]\n", sqlca.sqlcode);
EXEC SQL CLOSE table_columns_cur1;
return sqlca.sqlcode;
}
就在这打开游标的时候报错了,805错误,我确实是bind了,请问这个游标声明的有问题不,该如何改正,跪求~
------解决方案--------------------------------------------------------
最大嫌疑就是把别名中文 改成英文字符试试看