Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ADO.NET, datasets, XMLDOM, VFP 8?
Message
From
29/10/2003 12:25:02
 
 
To
29/10/2003 08:13:48
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00843864
Message ID:
00844152
Views:
27
Hi Aleksey

Thank you very much for your complete answer. I used the first method as you
suggest. I use C# webservice, SQL Server 2000 and VFP 8.0. The c# component
and SQL Server 2000 in a Windows XP 2.4 Gz workstation, and the component in
VFP in another Windows XP workstation in a local network.

The results were:

**********/10 records /***********

lowsrUsuario.metConsultaSaldo(): 0.012

XMLAdapter.Attach: 0.002
Fill through XMLAdapter after Attach
Time: 0.005
Records: 10
XMLSize 3725
Total time: 0.019


**********/100 records /***********

lowsrUsuario.metConsultaSaldo(): 0.024

XMLAdapter.Attach: 0.004
Fill through XMLAdapter after Attach
Time: 0.025
Records: 100
XMLSize 28427
Total time: 0.053


**********/500 records /***********

lowsrUsuario.metConsultaSaldo(): 0.212

XMLAdapter.Attach: 0.009
Fill through XMLAdapter after Attach
Time: 0.119
Records: 500
XMLSize 139744
Total time: 0.340


**********/1000 records /***********

lowsrUsuario.metConsultaSaldo(): 0.291

XMLAdapter.Attach: 0.021
Fill through XMLAdapter after Attach
Time: 0.235
Records: 1000
XMLSize 278916
Total time: 0.547


**********/5000 records /***********

lowsrUsuario.metConsultaSaldo(): 0.915

XMLAdapter.Attach: 0.096
Fill through XMLAdapter after Attach
Time: 1.403
Records: 5000
XMLSize 1406811
Total time: 2.414



**********/10000 records /***********

lowsrUsuario.metConsultaSaldo(): 1.518

XMLAdapter.Attach: 0.400
Fill through XMLAdapter after Attach
Time: 2.540
Records: 10000
XMLSize 2807286
Total time: 4.458


**********/15000 records /***********

lowsrUsuario.metConsultaSaldo(): 2.472

XMLAdapter.Attach: 0.311
Fill through XMLAdapter after Attach
Time: 3.574
Records: 15000
XMLSize 4174958
Total time: 6.357


**********/30000 records /***********

lowsrUsuario.metConsultaSaldo(): 4.151

XMLAdapter.Attach: 0.703
Fill through XMLAdapter after Attach
Time: 7.574
Records: 30000
XMLSize 8280028
Total time: 12.428

**********/60000 records /***********

lowsrUsuario.metConsultaSaldo(): 8.981

XMLAdapter.Attach: 1.954
Fill through XMLAdapter after Attach
Time: 15.137
Records: 60000
XMLSize 16575270
Total time: 26.072


**********/120000 records /***********
lowsrUsuario.metConsultaSaldo(): 23.581

XMLAdapter.Attach: 5.278
Fill through XMLAdapter after Attach
Time: 31.230
Records: 120000
XMLSize 33207045
Total time: 60.089

As you can see is a linear function, with the other methods is an exponencial function.

The code in VFP :



LOCAL lowsrUsuario AS "XML Web Service"
* LOCAL lowsrUsuario AS "MSSOAP.SoapClient30"
* Do not remove or alter following line. It is used to support IntelliSense for your XML Web service.
*__VFPWSDef__: lowsrUsuario = http://arturo/webservice/wsrusuario.asmx?wsdl , wsrUsuario , wsrUsuarioSoap
LOCAL loException, lcErrorMsg, loWSHandler
TRY
loWSHandler = NEWOBJECT("WSHandler",IIF(VERSION(2)=0,"",HOME()+"FFC\")+"_ws3client.vcx")
lowsrUsuario = loWSHandler.SetupClient("http://arturo/webservice/wsrusuario.asmx?wsdl", "wsrUsuario", "wsrUsuarioSoap")
* Call your XML Web service here. ex: leResult = lowsrUsuario.SomeMethod()

PUBLIC leResult
CLEAR

SecondsBefore=SECONDS()
retVal=lowsrUsuario.metConsultaSaldo()

elapsed0=SECONDS()-SecondsBefore
?"lowsrUsuario.metConsultaSaldo():",elapsed0
?
LOCAL oXA AS XMLADAPTER

oXA=CREATEOBJECT("XMLAdapter")

SecondsBefore=SECONDS()
oXA.ATTACH(retVal.ITEM(1),retVal.ITEM(0))
elapsed1=SECONDS()-SecondsBefore
?"XMLAdapter.Attach:",elapsed1



LOCAL oCA AS CURSORADAPTER
oCA=CREATEOBJECT("CursorAdapter")
WITH oCA
.DATASOURCETYPE = 'XML'
.SELECTCMD="oXA.TAbles.Item(1)"
.ALIAS = 'ca_xmlarturo'
ENDWITH


SecondsBefore=SECONDS()
IF !oCA.CURSORFILL()
AERROR(aerrs)
DISPLAY MEMORY LIKE aerrs
ENDIF
elapsed2=SECONDS()-SecondsBefore
?"Fill through XMLAdapter after Attach"
?"Time:",elapsed2
?"Records:",RECCOUNT("ca_xmlarturo")
?"XMLSize",LEN(retVal.ITEM(1).XML)+LEN(retVal.ITEM(0).XML)
?"Total time:",elapsed1+elapsed2+elapsed0

retVal=NULL
oXA.RELEASEXML(.T.)

USE IN ca_xmlarturo

CATCH TO loException
lcErrorMsg="Error: "+TRANSFORM(loException.Errorno)+" - "+loException.MESSAGE
DO CASE
CASE VARTYPE(lowsrUsuario)#"O"
* Handle SOAP error connecting to web service
CASE !EMPTY(lowsrUsuario.FaultCode)
* Handle SOAP error calling method
lcErrorMsg=lcErrorMsg+CHR(13)+lowsrUsuario.Detail
OTHERWISE
* Handle other error
ENDCASE
* Use for debugging purposes
MESSAGEBOX(lcErrorMsg)
FINALLY
ENDTRY



I´m going to do more test with other components.

Thanks again.

Carlos
Carlos A. Miranda
E.I.S.lnc
President
Previous
Reply
Map
View

Click here to load this message in the networking platform