public OracleCommand (string commandText, OracleConnection connection, OracleTransaction tx) { moreResults = -1; preparedStatement = null; CommandText = commandText; Connection = connection; Transaction = tx; CommandType = CommandType.Text; UpdatedRowSource = UpdateRowSource.Both; DesignTimeVisible = true; parameters = new OracleParameterCollection (); }
public OracleCommand(string commandText, OracleConnection connection, OracleTransaction tx) { moreResults = -1; preparedStatement = null; CommandText = commandText; Connection = connection; Transaction = tx; CommandType = CommandType.Text; UpdatedRowSource = UpdateRowSource.Both; DesignTimeVisible = true; parameters = new OracleParameterCollection(); }
private OracleCommand(OracleCommand command) : this() { this.CommandText = command.CommandText; this.CommandType = command.CommandType; this.Connection = command.Connection; this.DesignTimeVisible = command.DesignTimeVisible; this.UpdatedRowSource = command.UpdatedRowSource; this.Transaction = command.Transaction; if ((command._parameterCollection != null) && (0 < command._parameterCollection.Count)) { OracleParameterCollection parameters = this.Parameters; foreach (ICloneable cloneable in command.Parameters) { parameters.Add(cloneable.Clone()); } } }
private LocalParameter[] ParseText(OracleCommand command, string commandText, out bool isQuery) { OracleParameterCollection parameters = command.Parameters; ArrayList list = new ArrayList(); Regex sqlTokenParser = GetSqlTokenParser(); isQuery = false; bool flag = false; for (Match match = sqlTokenParser.Match(commandText); Match.Empty != match; match = match.NextMatch()) { if (!match.Groups[_commentGroup].Success) { if ((match.Groups[_identifierGroup].Success || match.Groups[_stringGroup].Success) || match.Groups[_otherGroup].Success) { flag = true; } else if (match.Groups[_queryGroup].Success) { if (!flag) { isQuery = true; } } else if (match.Groups[_parameterMarkerGroup].Success) { string parameterName = match.Groups[_parameterMarkerGroup].Value.Substring(1); this._usedParameterNames[parameterName] = null; int index = parameters.IndexOf(parameterName); if (0 > index) { string str2 = ":" + parameterName; index = parameters.IndexOf(str2); } if (0 <= index) { list.Add(new LocalParameter(index, match.Index, match.Length)); } } } } LocalParameter[] array = new LocalParameter[list.Count]; list.CopyTo(array, 0); return(array); }
public static void DeriveParameters(OracleCommand command) { OracleConnection.ExecutePermission.Demand(); if (command == null) { throw System.Data.Common.ADP.ArgumentNull("command"); } CommandType commandType = command.CommandType; if (commandType != CommandType.Text) { if (commandType == CommandType.StoredProcedure) { if (System.Data.Common.ADP.IsEmpty(command.CommandText)) { throw System.Data.Common.ADP.CommandTextRequired("DeriveParameters"); } OracleConnection connection = command.Connection; if (connection == null) { throw System.Data.Common.ADP.ConnectionRequired("DeriveParameters"); } ConnectionState state = connection.State; if (ConnectionState.Open != state) { throw System.Data.Common.ADP.OpenConnectionRequired("DeriveParameters", state); } ArrayList list = DeriveParametersFromStoredProcedure(connection, command); OracleParameterCollection parameters = command.Parameters; parameters.Clear(); int count = list.Count; for (int i = 0; i < count; i++) { parameters.Add((OracleParameter)list[i]); } return; } if (commandType != CommandType.TableDirect) { throw System.Data.Common.ADP.InvalidCommandType(command.CommandType); } } throw System.Data.Common.ADP.DeriveParametersNotSupported(command); }
/// <summary> /// 将 <see cref="SqlParameterCollection"/> 对象中的参数加入到 <see cref="OracleParameterCollection"/> 对象中。 /// </summary> private void AddDbParameter(SqlParameterCollection sqlParameterCollection, System.Data.OracleClient.OracleParameterCollection oracleParameterCollection) { if (sqlParameterCollection == null || oracleParameterCollection == null) { return; } OracleParameter[] clonedParameters = new OracleParameter[sqlParameterCollection.Count]; for (int i = 0, j = sqlParameterCollection.Count; i < j; i++) { OracleParameter p = (OracleParameter)((ICloneable)sqlParameterCollection[i]).Clone(); // 检查未分配值的输入参数,将其分配以DBNull.Value. if ((p.Direction == ParameterDirection.InputOutput || p.Direction == ParameterDirection.Input) && (p.Value == null)) { p.Value = DBNull.Value; } clonedParameters[i] = p; } oracleParameterCollection.AddRange(clonedParameters); }
public static OracleParameter AddInput(OracleParameterCollection parameters, String name, OracleType type, Object val) { OracleParameter parameter = new OracleParameter(); parameter.Direction = ParameterDirection.Input; parameter.ParameterName = name; parameter.Value = val; parameter.OracleType = type; parameters.Add(parameter); return parameter; }
public override DataTable FillTable(string commandText, OracleParameterCollection dbParameters) { return DbImplementor.FillTable(commandText, dbParameters); }
public abstract DataTable FillTable(string commandText, OracleParameterCollection dbParameters);
/// <summary> /// Builds an OracleParametersCollection for an INSERT command, according to the DbTypeParameters in this collection. /// </summary> /// <param name="a_oParams">The OracleParameterCollection to be filled.</param> private void AddInsertCommandParameters(OracleParameterCollection a_oParams) { foreach (DbTypeParameter l_oCurrent in this) { a_oParams.Add(l_oCurrent.ParameterName, l_oCurrent.Value); } }
public DataTable FillTable(string commandText, OracleParameterCollection dbParameters) { var command = new OracleCommand(commandText, (OracleConnection)Connection); foreach (OracleParameter oracleParameter in dbParameters) { command.Parameters.Add(oracleParameter); } var da = new OracleDataAdapter(command); var ds = new DataSet("MyDataSet"); da.Fill(ds); return ds.Tables[0]; }
public static void AddParameter(string name, object value, OracleType oracleType, OracleParameterCollection parameters) { OracleParameter p = new OracleParameter("p" + name, oracleType); switch (oracleType) { case OracleType.NVarChar: case OracleType.VarChar: case OracleType.Clob: case OracleType.NClob: if (value == null) { p.Value = string.Empty; } else { if (value.ToString() == "") { p.Value = string.Empty; } else { p.Value = value; } } break; case OracleType.DateTime: p.Value = value == null ? DateTime.Now : value; break; default: throw new Exception("AddParameter:oracleType未定义"); } parameters.Add(p); }
public string[] GetValueParametri() { S_ControlsCollection CollezioneControlli = new S_ControlsCollection(); S_Controls.Collections.S_Object s_totEQ = new S_Object(); s_totEQ.ParameterName = "p_totEQ"; s_totEQ.DbType = CustomDBType.Integer; s_totEQ.Direction = ParameterDirection.Output; s_totEQ.Index = 0; s_totEQ.Size = 50; S_Controls.Collections.S_Object s_totEQSTDinEQ = new S_Object(); s_totEQSTDinEQ.ParameterName = "p_totEQSTDinEQ"; s_totEQSTDinEQ.DbType = CustomDBType.Integer; s_totEQSTDinEQ.Direction = ParameterDirection.Output; s_totEQSTDinEQ.Index = 1; s_totEQSTDinEQ.Size = 50; S_Controls.Collections.S_Object s_totEQinPMS = new S_Object(); s_totEQinPMS.ParameterName = "p_totEQinPMS"; s_totEQinPMS.DbType = CustomDBType.Integer; s_totEQinPMS.Direction = ParameterDirection.Output; s_totEQinPMS.Index = 2; s_totEQinPMS.Size = 50; S_Controls.Collections.S_Object s_totEQnoPMS = new S_Object(); s_totEQnoPMS.ParameterName = "p_totEQnoPMS"; s_totEQnoPMS.DbType = CustomDBType.Integer; s_totEQnoPMS.Direction = ParameterDirection.Output; s_totEQnoPMS.Index = 3; s_totEQnoPMS.Size = 50; S_Controls.Collections.S_Object s_totEQSTDinPMP = new S_Object(); s_totEQSTDinPMP.ParameterName = "p_totEQSTDinPMP"; s_totEQSTDinPMP.DbType = CustomDBType.Integer; s_totEQSTDinPMP.Direction = ParameterDirection.Output; s_totEQSTDinPMP.Index = 4; s_totEQSTDinPMP.Size = 50; S_Controls.Collections.S_Object s_totEQSTDEQinPMP = new S_Object(); s_totEQSTDEQinPMP.ParameterName = "p_totEQSTDEQinPMP"; s_totEQSTDEQinPMP.DbType = CustomDBType.Integer; s_totEQSTDEQinPMP.Direction = ParameterDirection.Output; s_totEQSTDEQinPMP.Index = 5; s_totEQSTDEQinPMP.Size = 50; S_Controls.Collections.S_Object s_totEQSTD = new S_Object(); s_totEQSTD.ParameterName = "p_totEQSTD"; s_totEQSTD.DbType = CustomDBType.Integer; s_totEQSTD.Direction = ParameterDirection.Output; s_totEQSTD.Index = 6; s_totEQSTD.Size = 50; CollezioneControlli.Add(s_totEQ); CollezioneControlli.Add(s_totEQSTDinEQ); CollezioneControlli.Add(s_totEQinPMS); CollezioneControlli.Add(s_totEQnoPMS); CollezioneControlli.Add(s_totEQSTDinPMP); CollezioneControlli.Add(s_totEQSTDEQinPMP); CollezioneControlli.Add(s_totEQSTD); ApplicationDataLayer.OracleDataLayer _OraDl = new OracleDataLayer(s_ConnStr); string s_StrSql = "PACK_SCHEDULA.getConta_EQ_PMP"; System.Data.OracleClient.OracleParameterCollection Parametri = _OraDl.ParametersArray(CollezioneControlli, s_StrSql); string[] ParValues = new string[Parametri.Count]; for (int Par = 0; Par < Parametri.Count; Par++) { //ParValues.SetValue(Parametri[Par].Value,Par); ParValues[Par] = Parametri[Par].Value.ToString(); } return(ParValues); }
public static OracleParameter AddReturnString(OracleParameterCollection parameters, String name, OracleType type, Int32 size) { OracleParameter parameter = new OracleParameter(); parameter.Direction = ParameterDirection.ReturnValue; parameter.ParameterName = name; parameter.OracleType = type; parameter.Size = size; parameters.Add(parameter); return parameter; }
public OracleDBParameterCollection(System.Data.OracleClient.OracleParameterCollection parcol) { this.parcol = parcol; }
[Test] // RemoveAt (String) public void RemoveAt2 () { OracleParameter paramA = new OracleParameter ("ParamI", 1); OracleParameter paramB = new OracleParameter ("Parami", 2); OracleParameter paramC = new OracleParameter ("paramI", 3); OracleParameter paramD = new OracleParameter ("parami", 4); OracleParameter paramE = new OracleParameter ("parami", 5); o.Add (paramA); o.Add (paramB); o.Add (paramC); o.Add (paramD); o.Add (paramE); o.RemoveAt ("paramI"); Assert.AreEqual (0, o.IndexOf (paramA), "#A1"); Assert.AreEqual (1, o.IndexOf (paramB), "#A2"); Assert.AreEqual (-1, o.IndexOf (paramC), "#A3"); Assert.AreEqual (2, o.IndexOf (paramD), "#A4"); Assert.AreEqual (3, o.IndexOf (paramE), "#A5"); o.RemoveAt ("parami"); Assert.AreEqual (0, o.IndexOf (paramA), "#B1"); Assert.AreEqual (1, o.IndexOf (paramB), "#B2"); Assert.AreEqual (-1, o.IndexOf (paramC), "#B3"); Assert.AreEqual (-1, o.IndexOf (paramD), "#B4"); Assert.AreEqual (2, o.IndexOf (paramE), "#B5"); o.RemoveAt ("Parami"); Assert.AreEqual (0, o.IndexOf (paramA), "#C1"); Assert.AreEqual (-1, o.IndexOf (paramB), "#C2"); Assert.AreEqual (-1, o.IndexOf (paramC), "#C3"); Assert.AreEqual (-1, o.IndexOf (paramD), "#C4"); Assert.AreEqual (1, o.IndexOf (paramE), "#C5"); o.RemoveAt ("Parami"); Assert.AreEqual (0, o.IndexOf (paramA), "#D1"); Assert.AreEqual (-1, o.IndexOf (paramB), "#D2"); Assert.AreEqual (-1, o.IndexOf (paramC), "#D3"); Assert.AreEqual (-1, o.IndexOf (paramD), "#D4"); Assert.AreEqual (-1, o.IndexOf (paramE), "#D5"); o.RemoveAt ("ParamI"); Assert.AreEqual (-1, o.IndexOf (paramA), "#E1"); Assert.AreEqual (-1, o.IndexOf (paramB), "#E2"); Assert.AreEqual (-1, o.IndexOf (paramC), "#E3"); Assert.AreEqual (-1, o.IndexOf (paramD), "#E4"); Assert.AreEqual (-1, o.IndexOf (paramE), "#E5"); o.Add (paramA); o.Add (paramB); o.Add (paramE); OracleParameterCollection o2 = new OracleParameterCollection (); o2.Add (paramC); o2.Add (paramD); }
[Test] // RemoveAt (Int32) public void RemoveAt1 () { OracleParameter paramA = new OracleParameter ("ParamI", 1); OracleParameter paramB = new OracleParameter ("Parami", 2); OracleParameter paramC = new OracleParameter ("paramI", 3); o.Add (paramA); o.Add (paramB); o.Add (paramC); o.RemoveAt (2); Assert.AreEqual (0, o.IndexOf (paramA), "#A1"); Assert.AreEqual (1, o.IndexOf (paramB), "#A2"); Assert.AreEqual (-1, o.IndexOf (paramC), "#A3"); o.RemoveAt (0); Assert.AreEqual (-1, o.IndexOf (paramA), "#B1"); Assert.AreEqual (0, o.IndexOf (paramB), "#B2"); Assert.AreEqual (-1, o.IndexOf (paramC), "#B3"); o.RemoveAt (0); Assert.AreEqual (-1, o.IndexOf (paramA), "#C1"); Assert.AreEqual (-1, o.IndexOf (paramB), "#C2"); Assert.AreEqual (-1, o.IndexOf (paramC), "#C3"); o.Add (paramA); o.Add (paramC); OracleParameterCollection o2 = new OracleParameterCollection (); o2.Add (paramB); }
[Test] // OracleParameter this [Int32] public void Indexer1 () { OracleParameter paramA = new OracleParameter ("ParamI", 1); OracleParameter paramB = new OracleParameter ("paramI", 2); OracleParameter paramC = new OracleParameter ("Parami", 3); o.Add (paramA); o.Add (paramB); Assert.AreSame (paramA, o [0], "#A1"); Assert.AreSame (paramB, o [1], "#A2"); o [0] = paramA; Assert.AreSame (paramA, o [0], "#B1"); Assert.AreSame (paramB, o [1], "#B2"); o [0] = paramC; Assert.AreSame (paramC, o [0], "#C1"); Assert.AreSame (paramB, o [1], "#C2"); o [1] = paramA; Assert.AreSame (paramC, o [0], "#D1"); Assert.AreSame (paramA, o [1], "#D2"); OracleParameterCollection o2 = new OracleParameterCollection (); o2.Add (paramB); }
private DataSet GetCodApparecchiature(string CodEdificio, string CodServizio, string Apparecchiatura) { System.Data.OracleClient.OracleParameterCollection Coll = new System.Data.OracleClient.OracleParameterCollection(); System.Data.OracleClient.OracleParameter p_Bl_Id = new System.Data.OracleClient.OracleParameter(); p_Bl_Id.ParameterName = "p_Bl_Id"; p_Bl_Id.Size = 50; p_Bl_Id.Direction = ParameterDirection.Input; p_Bl_Id.OracleType = OracleType.VarChar; p_Bl_Id.Value = ""; Coll.Add(p_Bl_Id); OracleParameter s_p_campus = new OracleParameter(); s_p_campus.ParameterName = "p_campus"; s_p_campus.Direction = ParameterDirection.Input; s_p_campus.OracleType = OracleType.VarChar; s_p_campus.Value = CodEdificio; Coll.Add(s_p_campus); OracleParameter s_p_Servizio = new OracleParameter(); s_p_Servizio.ParameterName = "p_Servizio"; s_p_Servizio.Direction = ParameterDirection.Input; s_p_Servizio.OracleType = OracleType.Int32; s_p_Servizio.Value = (CodServizio == "")? 0:Int32.Parse(CodServizio); Coll.Add(s_p_Servizio); OracleParameter s_p_eqstdid = new OracleParameter(); s_p_eqstdid.ParameterName = "p_eqstdid"; s_p_eqstdid.Direction = ParameterDirection.Input; s_p_eqstdid.OracleType = OracleType.Int32; s_p_eqstdid.Value = (Apparecchiatura == "")? 0:Int32.Parse(Apparecchiatura); s_p_eqstdid.Size = 8; Coll.Add(s_p_eqstdid); OracleParameter s_p_eq_id = new OracleParameter(); s_p_eq_id.ParameterName = "p_eq_id"; s_p_eq_id.Direction = ParameterDirection.Input; s_p_eq_id.OracleType = OracleType.VarChar; s_p_eq_id.Value = ""; //(cmbEQ.SelectedValue==string.Empty)? "":cmbEQ.Items[cmbEQ.SelectedIndex].Text; s_p_eq_id.Size = 50; Coll.Add(s_p_eq_id); // 19-07-2005 Armando: aggiunto parametro OracleParameter p_dismesso = new OracleParameter(); p_dismesso.ParameterName = "p_dismesso"; p_dismesso.Direction = ParameterDirection.Input; p_dismesso.OracleType = OracleType.Int32; p_dismesso.Value = 0; Coll.Add(p_dismesso); // Armando fine OracleParameter p_Username = new OracleParameter(); p_Username.ParameterName = "p_Username"; p_Username.Size = 50; p_Username.Direction = ParameterDirection.Input; p_Username.OracleType = OracleType.VarChar; p_Username.Value = this.userName; Coll.Add(p_Username); OracleParameter PaCursor = new OracleParameter(); PaCursor.ParameterName = "IO_CURSOR"; PaCursor.Direction = ParameterDirection.Output; PaCursor.OracleType = OracleType.Cursor; Coll.Add(PaCursor); DataSet _MyDs = base.GetData(Coll, "PACK_APPARECCHIATURE.SP_RICERCAAPPARECCHIATURA"); return(_MyDs); }
public void SetUp () { oldCulture = CultureInfo.CurrentCulture; Thread.CurrentThread.CurrentCulture = new CultureInfo ("tr-TR"); o = new OracleParameterCollection (); }
[Test] // Add (Object) public void Add1_Value_Owned () { OracleParameter param = new OracleParameter ("ParamI", 1); o.Add ((object) param); // attempt to add same OracleParameter to collection twice try { o.Add ((object) param); Assert.Fail ("#A1"); } catch (ArgumentException ex) { // The OracleParameter is already contained by // another OracleParameterCollection Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#A2"); Assert.IsNull (ex.InnerException, "#A3"); Assert.IsNotNull (ex.Message, "#A4"); Assert.IsTrue (ex.Message.IndexOf (o.GetType ().Name) != -1, "#A5"); Assert.IsTrue (ex.Message.IndexOf (typeof (OracleParameter).Name) != -1, "#A6"); Assert.IsNull (ex.ParamName, "#A7"); } OracleParameterCollection o2 = new OracleParameterCollection (); // attempt to add OracleParameter to another collection try { o2.Add ((object) param); Assert.Fail ("#B1"); } catch (ArgumentException ex) { // The OracleParameter is already contained by // another OracleParameterCollection Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#B2"); Assert.IsNull (ex.InnerException, "#B3"); Assert.IsNotNull (ex.Message, "#B4"); Assert.IsTrue (ex.Message.IndexOf (o.GetType ().Name) != -1, "#B5"); Assert.IsTrue (ex.Message.IndexOf (typeof (OracleParameter).Name) != -1, "#B6"); Assert.IsNull (ex.ParamName, "#B7"); } o.Remove ((object) param); o.Add ((object) param); o.Remove ((object) param); o2.Add ((object) param); }
[Test] // OracleParameter this [String] public void Indexer2 () { OracleParameter paramA = new OracleParameter ("ParamI", 1); OracleParameter paramB = new OracleParameter ("Parami", 2); OracleParameter paramC = new OracleParameter ("paramI", 3); OracleParameter paramD = new OracleParameter ("parami", 4); OracleParameter paramE = new OracleParameter ("ParamI", 5); OracleParameter paramF = new OracleParameter ("Parami", 6); OracleParameter paramG = new OracleParameter ("ParamG", 7); OracleParameter paramH = new OracleParameter ("ParamH", 8); o.Add (paramA); o.Add (paramB); o.Add (paramC); o.Add (paramD); o.Add (paramE); o.Add (paramF); Assert.AreSame (paramA, o ["ParamI"], "#A1"); Assert.AreSame (paramB, o ["Parami"], "#A2"); Assert.AreSame (paramC, o ["paramI"], "#A3"); Assert.AreSame (paramD, o ["parami"], "#A4"); Assert.AreEqual (0, o.IndexOf (paramA), "#A5"); Assert.AreEqual (1, o.IndexOf (paramB), "#A6"); Assert.AreEqual (2, o.IndexOf (paramC), "#A7"); Assert.AreEqual (3, o.IndexOf (paramD), "#A8"); Assert.AreEqual (4, o.IndexOf (paramE), "#A9"); Assert.AreEqual (5, o.IndexOf (paramF), "#A10"); Assert.AreEqual (-1, o.IndexOf (paramG), "#A11"); Assert.AreEqual (-1, o.IndexOf (paramH), "#A12"); o ["ParamI"] = paramG; Assert.AreSame (paramE, o ["ParamI"], "#B1"); Assert.AreSame (paramB, o ["Parami"], "#B2"); Assert.AreSame (paramC, o ["paramI"], "#B3"); Assert.AreSame (paramD, o ["parami"], "#B4"); Assert.AreSame (paramG, o ["paramG"], "#B5"); Assert.AreEqual (-1, o.IndexOf (paramA), "#B6"); Assert.AreEqual (1, o.IndexOf (paramB), "#B7"); Assert.AreEqual (2, o.IndexOf (paramC), "#B8"); Assert.AreEqual (3, o.IndexOf (paramD), "#B9"); Assert.AreEqual (4, o.IndexOf (paramE), "#B10"); Assert.AreEqual (5, o.IndexOf (paramF), "#B11"); Assert.AreEqual (0, o.IndexOf (paramG), "#B12"); Assert.AreEqual (-1, o.IndexOf (paramH), "#B13"); o ["ParamI"] = paramH; Assert.AreSame (paramC, o ["ParamI"], "#C1"); Assert.AreSame (paramB, o ["Parami"], "#C2"); Assert.AreSame (paramC, o ["paramI"], "#C3"); Assert.AreSame (paramD, o ["parami"], "#C4"); Assert.AreSame (paramG, o ["paramG"], "#C5"); Assert.AreSame (paramH, o ["paramH"], "#C6"); Assert.AreEqual (-1, o.IndexOf (paramA), "#C6"); Assert.AreEqual (1, o.IndexOf (paramB), "#C7"); Assert.AreEqual (2, o.IndexOf (paramC), "#C8"); Assert.AreEqual (3, o.IndexOf (paramD), "#C9"); Assert.AreEqual (-1, o.IndexOf (paramE), "#C10"); Assert.AreEqual (5, o.IndexOf (paramF), "#C11"); Assert.AreEqual (0, o.IndexOf (paramG), "#C12"); Assert.AreEqual (4, o.IndexOf (paramH), "#C13"); o ["paramG"] = paramA; Assert.AreSame (paramA, o ["ParamI"], "#D1"); Assert.AreSame (paramB, o ["Parami"], "#D2"); Assert.AreSame (paramC, o ["paramI"], "#D3"); Assert.AreSame (paramD, o ["parami"], "#D4"); Assert.AreSame (paramH, o ["paramH"], "#D5"); Assert.AreEqual (0, o.IndexOf (paramA), "#D6"); Assert.AreEqual (1, o.IndexOf (paramB), "#D7"); Assert.AreEqual (2, o.IndexOf (paramC), "#D8"); Assert.AreEqual (3, o.IndexOf (paramD), "#D9"); Assert.AreEqual (-1, o.IndexOf (paramE), "#D10"); Assert.AreEqual (5, o.IndexOf (paramF), "#D11"); Assert.AreEqual (-1, o.IndexOf (paramG), "#D12"); Assert.AreEqual (4, o.IndexOf (paramH), "#D13"); o ["ParamI"] = paramA; Assert.AreSame (paramA, o ["ParamI"], "#E1"); Assert.AreSame (paramB, o ["Parami"], "#E2"); Assert.AreSame (paramC, o ["paramI"], "#E3"); Assert.AreSame (paramD, o ["parami"], "#E4"); Assert.AreSame (paramH, o ["paramH"], "#E5"); Assert.AreEqual (0, o.IndexOf (paramA), "#E6"); Assert.AreEqual (1, o.IndexOf (paramB), "#E7"); Assert.AreEqual (2, o.IndexOf (paramC), "#E8"); Assert.AreEqual (3, o.IndexOf (paramD), "#E9"); Assert.AreEqual (-1, o.IndexOf (paramE), "#E10"); Assert.AreEqual (5, o.IndexOf (paramF), "#E11"); Assert.AreEqual (-1, o.IndexOf (paramG), "#E12"); Assert.AreEqual (4, o.IndexOf (paramH), "#E13"); o ["paramI"] = paramC; Assert.AreSame (paramA, o ["ParamI"], "#F1"); Assert.AreSame (paramB, o ["Parami"], "#F2"); Assert.AreSame (paramC, o ["paramI"], "#F3"); Assert.AreSame (paramD, o ["parami"], "#F4"); Assert.AreSame (paramH, o ["paramH"], "#F5"); Assert.AreEqual (0, o.IndexOf (paramA), "#F6"); Assert.AreEqual (1, o.IndexOf (paramB), "#F7"); Assert.AreEqual (2, o.IndexOf (paramC), "#F8"); Assert.AreEqual (3, o.IndexOf (paramD), "#F9"); Assert.AreEqual (-1, o.IndexOf (paramE), "#F10"); Assert.AreEqual (5, o.IndexOf (paramF), "#F11"); Assert.AreEqual (-1, o.IndexOf (paramG), "#F12"); Assert.AreEqual (4, o.IndexOf (paramH), "#F13"); OracleParameterCollection o2 = new OracleParameterCollection (); o2.Add (paramE); }
public static OracleParameter AddOutput(OracleParameterCollection parameters, String name, OracleType type) { OracleParameter parameter = new OracleParameter(); parameter.Direction = ParameterDirection.Output; parameter.ParameterName = name; parameter.OracleType = type; parameters.Add(parameter); return parameter; }
public DataTable FillTable(string commandText, OracleParameterCollection dbParameters) { return _repository.FillTable(commandText, dbParameters); }