码迷,mamicode.com
首页 > 数据库 > 详细

Siebel调用Oracle存储过程

时间:2016-09-03 23:56:36      阅读:272      评论:0      收藏:0      [点我收藏+]

标签:

技术分享

 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存储过程

标签:

原文地址:http://www.cnblogs.com/universalsiebel/p/5838269.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!