public string QueryXmlString(string flow, string request, ByIndexOrNameDictionary <string> arguments) { Query query = NewQueryObject(flow, request, arguments, 0, -1); ResultSetType resultSet = _requestor.Query(query); return(GetXmlString(resultSet.results)); }
/// <summary> /// Query /// </summary> /// <returns></returns> public XmlDocument Query(string request, ByIndexOrNameDictionary <string> arguments) { Query query = NewQueryObject(null, request, arguments, 0, -1); ResultSetType resultSet = _requestor.Query(query); return(GetXmlDoc(resultSet.results)); }
/// <summary> /// Query /// </summary> /// <returns></returns> public XmlDocument Query(string flow, string request, ByIndexOrNameDictionary <string> arguments, Int32 startRow, Int32 pageSize) { Query query = NewQueryObject(flow, request, arguments, startRow, pageSize); ResultSetType resultSet = _requestor.Query(query); return(GetXmlDoc(resultSet.results)); }
/// <summary> /// Query /// </summary> public CommonContentType QueryNoUncompress(string flow, string request, ByIndexOrNameDictionary <string> arguments, Int32 startRow, Int32 pageSize, string targetPath) { Query query = NewQueryObject(flow, request, arguments, startRow, pageSize); ResultSetType resultSet = _requestor.Query(query); File.WriteAllBytes(targetPath, GetRawBytes(resultSet.results)); return(GetContentType(resultSet.results.format)); }
public Executable AddTask_ExecSQL(string taskName, string connManName, string statement, Sequence sqp = null, SqlStatementSourceType sourceType = SqlStatementSourceType.DirectInput, ResultSetType resultSetType = ResultSetType.ResultSetType_None) { // DirectInput 1 // FileConnection 2 // Variable 3 Executable ex = null; if (sqp == null) { ex = p.Executables.Add("STOCK:SQLTask"); } else { ex = sqp.Executables.Add("STOCK:SQLTask"); } TaskHost SQLth = (TaskHost)ex; ExecuteSQLTask est = SQLth.InnerObject as ExecuteSQLTask; DtsProperty dt_name = SQLth.Properties["Name"]; DtsProperty dt_conn = SQLth.Properties["Connection"]; DtsProperty dt_sttp = SQLth.Properties["SqlStatementSourceType"]; DtsProperty dt_stat = SQLth.Properties["SqlStatementSource"]; dt_name.SetValue(SQLth, taskName); dt_conn.SetValue(SQLth, connManName); dt_sttp.SetValue(SQLth, sourceType); est.ResultSetType = resultSetType; switch (sourceType) { case SqlStatementSourceType.DirectInput: dt_stat.SetValue(SQLth, statement); break; case SqlStatementSourceType.Variable: dt_stat.SetValue(SQLth, statement); break; } return(ex); }
private object ConvertResultSet(ResultSet resultSet, ResultSetType resultSetType, Type propertyType) { switch (resultSetType) { case ResultSetType.Scalar: return(converter.ToScalar(propertyType, resultSet)); case ResultSetType.Scalars: return(converter.ToScalars(GetUnderlyingListType(propertyType), resultSet)); case ResultSetType.SingleRow: return(converter.ToSingleRow(propertyType, resultSet)); case ResultSetType.SingleOrDefaultRow: return(converter.ToSingleOrDefaultRow(propertyType, resultSet)); case ResultSetType.Rows: return(converter.ToRows(GetUnderlyingListType(propertyType), resultSet)); default: throw new NotImplementedException(); } }
public SQLTask SetResultSetType(ResultSetType resultSetType) { SSISObject.ResultSetType = (DtsSqlTask.ResultSetType)resultSetType; return(this); }
public ResultSetAttribute(int index, ResultSetType type) { this.Index = index; this.Type = type; }
public ResultSetAttribute(int index, ResultSetType type) { this.Index = index; this.Type = type; }
protected ResultSet(ResultSetType resultType) { Type = resultType; }