| Methods / Other Web Services | |
Web Services
Queries the database with any valid sql query and returns the dataset as a string in XML format.
public virtual string QueryDatabase(string sql)
| Name | Description |
|---|---|
sql |
|
An XML string that contains the dataset with the results of the database query.
IWFWorkflowService svc = GetWorkflowService();
string sql = "SELECT * FROM WF_AUDIT_TRAILS where CATEGORY = 0 AND
PURPOSE='Check-in process definition'";
try
{
// calling the QueryDatabase web method and passing the sql query as the argument.
string xml = svc.QueryDatabase(sql);
Console.WriteLine("{0}", xml);// Displaying the XML string on console.
System.IO.stringReader sr = new System.IO.stringBuilder(xml);
System.Data.DataSet ds = new System.Data.DataSet();
ds.LoadXml(sr);
}
catch (Exception ex)
{
Console.WriteLine("Failed! " + ShUtil.GetSoapMessage(ex));
}
3.2.0.4 and higher