首页 > 代码库 > Siebel调用Oracle存储过程
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 = http://www.mamicode.com/(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存储过程
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。