Skip to content

Flow documentation · legacy product

Flo_LoadDBCon ​

Declaration ​

C# public static extern bool Flo_LoadDBCon(string aFID, out string aXML, out string aXML2);

Delphi function Flo_LoadDBCon(aFID : PChar; out aXML, aXML2 : PChar) : Boolean; stdcall;

Example ​

csharp
try
{
string XML
string XML2;
Boolean result = FlowAPI.Flo_LoadDBCon("00000000-0000-0000-0000-000000000000", XML, XML2);
if (result)
{
TFloDBCon DBCon = new TFloDBCon();
DBCon = (TFloDBCon)XMLToObject(XML,DBCon.GetType());
MessageBox.Show("Successfully loaded DB Connection - " + DBCon.ModuleName);
}
else MessageBox.Show("Error loading DB Connection");
}
catch (Exception ex)
{
MessageBox.Show("Exception loading DB Connection - " + ex.Message);
}
pascal
Delphi
var XML, XML2: string
var oXML : DomDocument60;
try
Result := Flo_LoadDBCon('00000000-0000-0000-0000-000000000000', XML, XML2);
if Result then
begin
oXML:= CoDOMDocument60.Create;
oXML.LoadXML(XML);
showmessage('Successfully loaded DB Connection - ' + VarToStr(oXML.DocumentElement.selectSingleNode('ModuleName').nodeValue))
end else
showmessage('Error loading DB Connection');
except
on e : exception do
showmessage('Exception loading DB Connection - ' + e.Message);
end;

Description ​

This function loads the DB Connection specified by aFID and returns it as aXML and aXML2.

aXML2 is not used for DB Connections and will be returned as blank string.

If using C# you can easily work with the XML string by serializing it to an instance of a class