[英]How to pass VARGRAPHIC to Stored procedures in DB2?
How can I call a sp with VARGRAPHIC variable type as input? 如何调用以VARGRAPHIC变量类型作为输入的sp? I've create this super simple sp that dose nothing and just for test, with following statement:
我创建了这个超级简单的sp,它不添加任何内容,仅用于测试,并带有以下语句:
CREATE PROCEDURE MYPROCEDURE (IN VARNAME vargraphic(5) )
LANGUAGE SQL
P1: BEGIN
END P1
but when I call the sp in IBM Data Studio,it raises this error: 但是当我在IBM Data Studio中调用sp时,会引发此错误:
{? = call SCHEMA.MYPROCEDURE (?)}
[SQL0189] Coded Character Set Identifier 37 not valid.
Run of routine failed.
- Roll back completed successfully.
is there any problem in my sp code? 我的sp代码有什么问题吗? should I define CCSIDs?
我应该定义CCSID吗? How and where?
如何以及在哪里?
I suspect that you would want to specify the CCSID of your parameter like this 我怀疑您想像这样指定参数的CCSID
call SCHEMA.MYPROCEDURE( CAST(? AS VARGRAPHIC(5) CCSID 65535) )
picking the correct CCSID number as appropriate 选择适当的正确CCSID号
https://www.ibm.com/support/knowledgecenter/en/ssw_ibm_i_74/db2/rbafzcast.htm https://www.ibm.com/support/knowledgecenter/zh-CN/ssw_ibm_i_74/db2/rbafzcast.htm
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.