天翎MyApps技术社区 - 低代码平台 | 流程管理系统 | BPM软件

 找回密码
 注册成为天翎用户
12
返回列表 发新帖
楼主: ykse01

[客户端] MyApps webservice问题

[复制链接]
 楼主| ykse01 发表于 2011-8-31 13:27:05 | 显示全部楼层
使用函数库的话,动作执行脚本:
#include getConnection;
var conn= getConnection(getApplication());

报错JavaScriptRunning:[Activity Action(11e0-d2e4-af093f6c-8c1e-6da51fc9d86a).测试存储过程afterActionScript]: String index out of range: -1
shary 发表于 2011-8-31 13:58:27 | 显示全部楼层
不好意思,是我弄错了。你换成这个试一下:
var dsProcess= $PROCESSFACTORY.createProcess("cn.myapps.core.dynaform.dts.datasource.ejb.DataSourceProcess");
var conn= dsProcess.getConnection("OracleDriver_DC",getApplication());
 楼主| ykse01 发表于 2011-8-31 14:10:14 | 显示全部楼层
芸芸姐姐最后解决了,实际代码部分
var dsProcess= $PROCESSFACTORY.createProcess("cn.myapps.core.dynaform.dts.datasource.ejb.DataSourceProcess");
var conn= dsProcess.getConnection("OracleDriver_DC",getApplication());
var cs = null;
  try {
   var statement = conn.createStatement();
   cs = conn.prepareCall("{call DP_HALL_UPDATE}");
   cs.execute();
  } catch (e) {
  } finally {
   try {
    if(cs != null){
     cs.close();
    }
    if(conn != null){
     conn.close();
    }
   } catch (ex) {
   }
}

本版积分规则

QQ|手机版|天翎MyApps技术社区 ( 粤ICP备11093750号 )

GMT+8, 2026-8-12 15:27

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表