>Message 1: Table has no index order set.
At first sight, it looks like you need to create an index
LOCAL loXMLAdapter AS XMLAdapter
Select ft.ftstamp,fdata, fno,no, nome, morada,local,codpost from ft order by ft.fno into cursor Documento where ft.fno = 121005551
Select fi.ftstamp, fno,ref,design,qtt, epv,etiliquido,usr4 AS 'Codpautal',codigo from fi order by fi.fno into cursor Linhas where fi.fno = 121005551
index on ftstamp tag ftstamp
SELECT Documento
SET RELATION TO ftstamp INTO Linhas ADDITIVE
loXMLAdapter = CREATEOBJECT([XMLAdapter])
WITH loXMLAdapter AS XMLAdapter
.XMLSchemaLocation = [AddTableToSchema_Nest.xsd]
.RespectNesting = .T.
.AddTableSchema([Categories])
.AddTableSchema([Products])
.ToXML([AddTableToSchema_Nest.xml], [], .T.)
MODIFY FILE AddTableToSchema_Nest.xml
ENDWITH
loXMLAdapter = .NULL.
>Hello comunity
>
>I work with to cursor where i keep information of my documento (header invoice) and Linhas (Lines of invoice).
>
>I try to use this code:
>LOCAL loXMLAdapter AS XMLAdapter
>
>
>Select ft.ftstamp,fdata, fno,no, nome, morada,local,codpost from ft order by ft.fno into cursor Documento where ft.fno = 121005551
>
>Select fi.ftstamp, fno,ref,design,qtt, epv,etiliquido,usr4 AS 'Codpautal',codigo from fi order by fi.fno into cursor Linhas where fi.fno = 121005551
>
>
>SELECT Documento
>SET RELATION TO ftstamp INTO Linhas ADDITIVE
>
>
>loXMLAdapter = CREATEOBJECT([XMLAdapter])
>
>
>WITH loXMLAdapter AS XMLAdapter
> .XMLSchemaLocation = [AddTableToSchema_Nest.xsd]
> .RespectNesting = .T.
> .AddTableSchema([Categories])
> .AddTableSchema([Products])
> .ToXML([AddTableToSchema_Nest.xml], [], .T.)
> MODIFY FILE AddTableToSchema_Nest.xml
>ENDWITH
>
>loXMLAdapter = .NULL.
>
>But, this script return this error:
>Code 26
>Line: 10
>Message 1: Table has no index order set.
>
>someone could give me some help
>
>Best regards,
>
>Luis Santos
Gregory