Siebel调用Oracle存储过程

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Siebel调用Oracle存储过程相关的知识,希望对你有一定的参考价值。

技术分享

 1 var psInput = TheApplication().NewPropertySet();
 2 var psOutput = TheApplication().NewPropertySet();
 3 var bsEAIProc = TheApplication().GetService("EAI ODBC Service");
 4 psInput.SetProperty(“ExtDBODBCDataSource”, “ODBCName”);
 5 psInput.SetProperty(“ExtDBPassword”, “SIEBEL”);
 6 psInput.SetProperty(“ExtDBUserName”, “SIEBEL”);
 7 psInput.SetProperty(“ExtDBTableOwner”, “SIEBEL”);
 8 psInput.SetProperty(“ProcedureName”, “ProcedureName”);
 9 psInput.SetProperty(“ProcedureArgument”, “productID”);
10 bsEAIProc.InvokeMethod("ExecuteProc", psInput, psOutput);
11 var sStatus = psOutput.GetProperty("Status");

技术分享

 

 1 conn = COMCreateObject("ADODB.Connection");
 2 conStr = "Provider=OraOLEDB.Oracle;
 3 DataSource = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.0)(PORT = 1521))(CONNECT_DATA = (SERVICE_NAME = ORACLESERVICENAME)));
 4 User ID = "";
 5 Password = "";
 6 Persist Security Info = True ";
 7 conn.ConnectionString = conStr;
 8 conn.Open();
 9 rs = COMCreateObject("ADODB.Recordset");
10 adoCommand = COMCreateObject("ADODB.Command");
11 adoCommand.CommandType = 4;
12 adoCommand.CommandText = "siebel.ProcedureName"; //将CommandText为存储过程的名称。ProcedureName是存储过程名称
13 adoInputsParameters = adoCommand.CreateParameter("txtrowid", 200, 3, 40, "10011");
14 adoOutputsParameters = adoCommand.CreateParameter("srnum", 200, 3, 40, "10011");
15 adoCommand.Parameters.Append(adoInputsParameters);
16 adoCommand.Parameters.Append(adoOutputsParameters);
17 adoCommand.ActiveConnection = conn;
18 adoCommand.Execute();
19 conn.Close();

 

还有两个问题需要研究一下,Oracle Procedure Adapter和Oracle SQL Adapter,后期有结果分享。

以上是关于Siebel调用Oracle存储过程的主要内容,如果未能解决你的问题,请参考以下文章

oracle form怎么调用oracle存储过程

oracle 存储过程调用

oracle中的存储过程,有啥作用,以及怎么在代码中使用?

Oracle调用Java类开发的存储过程函数的方法

专家教师视角:在 Oracle 云计算平台上运行 Siebel CRM IP 2016

从另一个存储过程 oracle 调用存储过程