frequently asked questions

All your questions in one place.

Return an XML from a given table

*/ Instantiate end set the database location.

oBiz = createobject("bizinfo.application")

oBiz.cDatabasePath = "C:\WinBIZ Data"

oBiz.nCompany = 1000

oBiz.nYear = 2017

EOL = chr(10) + chr(13)

*/ Open the Addresses table.

oBiz.cScript = oBiz.cScript + [ oSession.TableOpen("Adresses") ] + EOL

*/ Extract the addresses whose name (ad_nom) is "Dupont".

oBiz.cScript = oBiz.cScript + [ select ad_numero, ad_nom, ad_prenom, ad_npa, ad_ville from adresses where ad_nom = "Dupont" order by ad_numero into cursor cQuery ] + EOL

*/ Create an XML string from the result of the previous command, and put the result in the lcXml variable.

oBiz.cScript = oBiz.cScript + [ cursortoxml(alias(), 'lcXml', 1, 0, 0, "1", '', '') ] + EOL

oBiz.cScript = oBiz.cScript + [ return lcXml ] + EOL

*/ Run the script. The value returned is an XML string.

lcXml = oBiz.ScriptExecute()

Did you find this article useful?

0 out of 0 found this helpful