Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error 26 Table has no index order set
Message
De
22/04/2014 00:58:14
 
 
À
21/04/2014 16:06:00
Luis Santos
Biglevel-Soluções Informáticas, Lda
Portugal
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01598711
Message ID:
01598884
Vues:
68
>Hello Gregory
>
>I need some help, can i run all this code by order from one .prg file?
>Also, i dont know the order i must use to run all your function.
>
>Could you me some help?
>
>Thanks again,
>Luis Santos

Luis,

>I need some help, can i run all this code by order from one .prg file?

Yes, you can

>Also, i dont know the order i must use to run all your function.

The whole flow is in here
function Luis()	
	
	local success
	success = true
	
	local obj
	obj = createobject('DocumentoXml')
	
	local fno, outputFile
	
	fno = 121005551
	outputFile = 'D:\tmp\Luis\Out.xml'
	
	do case
	case !m.success
	
	case !Luis_CreateCursors()
		assert false
		success = false
	
	case !m.obj.ToXml(m.outputFile, m.fno)
		assert false
		success = false
	
	endcase
	
	return m.success
	
	
endfunc
*_______________________________________________________________________________
Luis_CreateCursors() is getting your data into cursors ft and fi.
You get those from SqlServer I believe

Then there is a class 'DocumentoXml' with one public method ToXml which makes to xml file

You could move fetching the datafrom sql server (ft and fi) to a new method of the class if you wanted and add a parameter fno

like this
function ToXml(outputFile, fno)
	
	local success
	success = true
	
	do case
	case !m.success
	
	case !m.this.GetDataFromServer(m.fno)  && here
		assert false
		success = false

	case !m.this.PrepareCursors(m.fno)
		assert false
		success = false
	
	case !m.this.MakeXml(m.outputFile)
		assert false
		success = false
	
	case !m.this.CloseCursors()
		assert false
		success = false
	endcase
	
	return m.success
	
endfunc
*_______________________________________________________________________________
protected function GetDataFromServer(m.fno)
  && here you fetch the data from sql server into the cursors ft and fi
endfunc
*_______________________________________________________________________________
And add fi and ft to this method
protected function CloseCursors()

	use in select('Documento')
	use in select('Linhas')
	use in select('LinhasDesconto')

	use in select('ft')  && here
	use in select('fi')  && and here

endfunc
Gregory
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform