/// <remarks/> public void QueryAsync(Query Query1, object userState) { if ((this.QueryOperationCompleted == null)) { this.QueryOperationCompleted = new System.Threading.SendOrPostCallback(this.OnQueryOperationCompleted); } this.InvokeAsync("Query", new object[] { Query1}, this.QueryOperationCompleted, userState); }
internal static ResultSetType QueryHelper(string NodeURL, string secToken, string dataFlow, string request, int? rowID, int? maxRows, List<ParameterType> pars) { try { NetworkNode2 nn = new NetworkNode2(); nn.Url = NodeURL; nn.SoapVersion = SoapProtocolVersion.Soap12; Query q1 = new Query(); q1.securityToken = secToken; q1.dataflow = dataFlow; q1.request = request; q1.rowId = (rowID ?? 0).ToString(); q1.maxRows = (maxRows ?? -1).ToString(); ParameterType[] ps = new ParameterType[pars.Count]; int i = 0; System.Xml.XmlQualifiedName parType = new System.Xml.XmlQualifiedName("string", "http://www.w3.org/2001/XMLSchema"); foreach (ParameterType par in pars) { if (par.parameterEncoding == null) par.parameterEncoding = EncodingType.None; ps[i] = par; i++; } q1.parameters = ps; return nn.Query(q1); } catch (SoapException sExept) { db_Ref.InsertT_OE_SYS_LOG("ERROR", sExept.Message.SubStringPlus(0, 1999)); //logging an authentication failure //special handling of an unauthorized if (sExept.Message.SubStringPlus(0, 9) == "ORA-20997") { ResultSetType rs = new ResultSetType(); rs.rowId = "-99"; return rs; } return null; } }
/// <remarks/> public void QueryAsync(Query Query1) { this.QueryAsync(Query1, null); }