Just looking for some pointers really as I am totally new to UniData...
I am after pulling a table (if that is the right terminology??) from a UniData DB. The easiest way it seems is to do this using XML, which seems to be built in to the UniObjects API and UniData.
However, when using the API no XML is returned, just an empty XML error and when using UniCommand.command nothing at all is returned, just command status 0.
There seems to be some conflicting info here - some developers guides suggest the XML gets written to a file and not returned to the client?
Any pointers?
Cheers,
Kai.
UPDATE - Some code...
U2Connection con = new U2Connection();
U2ConnectionStringBuilder conn_str = new U2ConnectionStringBuilder();
try
{
conn_str.UserID = "BLAH-BLAH";
conn_str.Password = "BLAH-BLAH";
conn_str.Server = "BLAH-BLAH";
conn_str.AccessMode = "Native"; // FOR UO
conn_str.RpcServiceType = "udcs"; // FOR UO
conn_str.Database = "BLAH-BLAH";
conn_str.ServerType = "UNIDATA";
conn_str.Pooling = false;
con.ConnectionString = conn_str.ToString();
}
catch (Exception ex)
{
}
con.Open();
UniSession us = con.UniSession;
UniCommand unicmd = us.CreateUniCommand();
unicmd.Command = "LIST ASSET_REPORT";
unicmd.Execute();
Console.Write(unicmd.CommandStatus + Environment.NewLine);
Console.Write(unicmd.Response);
Console.Write(Environment.NewLine + "Done...");
Console.ReadKey();
con.Close();
Just to confirm, with the above code I can execute commands and retrieve their output. However, if I change the command to something like "LIST ASSET_REPORT TOXML" (as per all the guides I have found) I get nothing back. Equally, if I use the UniXML functions:
UniXML xml = us1.CreateUniXML();
xml.GenerateXML("LIST DICT ASSET");
DataSet ds = xml.GetDataSet();
All I get are empty dataset exceptions?