执行 DBUtils.ExecuteDynamicObject(ctx,strSQL)报错
金蝶云社区-Zw814
Zw814
1人赞赏了该文章 2,855次浏览 未经作者许可,禁止转载编辑于2017年02月04日 10:14:11

strSQL = "SELECT ISNULL(S1.FVALUE,0) + 1 AS FVALUE\r\n" +
"FROM T_BC_PUBLICSERIALSET S1 WITH(UPDLOCK)\r\n" +
"WHERE S1.FJUSTVALUE = '" + JustValue + "'\r\n" +
" AND FTYPE = '" + TypeValue + "'\r\n" ;
if (!IsPublic)
{
strSQL = strSQL +
" AND S1.FORGID = " + OrganizeID;
}
docValue = DBUtils.ExecuteDynamicObject(ctx,strSQL);
执行到DBUtils.ExecuteDynamicObject(ctx,strSQL)时报以下错误:

parse error. detail message is :

Not support locking hints.

source sql is :

SELECT ISNULL(S1.FVALUE,0) + 1 AS FVALUE

FROM T_BC_PUBLICSERIALSET S1 WITH(UPDLOCK)

WHERE S1.FJUSTVALUE = 'PPBOM00034998'

AND FTYPE = 'PACKBOXBATCHNO'

AND S1.FORGID = 100001