Appearance
Flo_SaveWebCon
Declaration
C# public static extern bool Flo_SaveWebCon(ref string aXML, ref string aXML2);
Delphi function Flo_SaveWebCon(var aXML, aXML2 : PChar) : boolean; stdcall;
Example
csharp
try
{
TFloWebCon WebCon = new TFloWebCon();
WebCon.FIDS = "00000000-0000-0000-0000-000000000000";
WebCon.ModuleName = "My new module";
string XML = ObjectToXML(WebCon);
string XML2;
Boolean result = Flo_SaveWebCon(ref XML, ref XML2);
if (result)
{
MessageBox.Show("Successfully saved Web Connection - " + WebCon.ModuleName);
}
else MessageBox.Show("Error saving Web Connection");
}
catch (Exception ex)
{
MessageBox.Show("Exception saving Web Connection - " + ex.Message);
}pascal
Delphi
var XML, XML2: string
var oXML : DomDocument60;
try
oXML:= CoDOMDocument60.Create;
...create elements in XML as necessary...
XML := oXML.xml;
XML2 := '';
Result := Flo_SaveWebCon(XML, XML2);
if Result then
begin
showmessage('Successfully saved Web Connection - ' + VarToStr(oXML.DocumentElement.selectSingleNode('ModuleName').nodeValue))
end else
showmessage('Error saving Web Connection');
except
on e : exception do
showmessage('Exception saving Web Connection - ' + e.Message);
end;Description
This function saves the Web Connection specified by aXML and aXML2. If the FIDS element is set to an empty guid it will become a new module, otherwise set FIDS to the value of the module you wish to update. You can find the FID value by looking at the FID column in the FLO_WEBCONNECTIONS table of the configuration database
aXML2 is not used for Web Connections and should be set to a blank string.
If using C# you can easily work with the XML string by serializing an instance of a class to XML