Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ADO.NET, datasets, XMLDOM, VFP 8?
Message
From
28/10/2003 18:24:56
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
ADO.NET, datasets, XMLDOM, VFP 8?
Miscellaneous
Thread ID:
00843864
Message ID:
00843864
Views:
55
Hello Everyone

I have a software created with visual studio 2003. This is complete set of
webservices, to control my inventory software. The functions return a
datasets or XMLDocs. I´m trying to consume this datasets or XMLDocs in VFP
8.0. My problem is when I have more 2000 records, the curfill function takes
a long of time to fillout the cursor, I´ve been test the function, and when
1000 records the cursorfill takes about 0.8 seconds, with 2000 records about
2.8 seconds, but with 3000 records takes about 10 to 12 seconds, with 5000
records takes about 60 seconds, as you can see it´s exponencial.

My questions are:
1. What is the better way to recover a .net dataset from VFP?.
2.What is the maximun size that supported by cursorfill in XML?.
3. An XMLAdapter recover the dataset faster than a cursorfill method?
4. Is there a library or something like that to covert xmltocursor in
a faster way than the original VFP functions.?

My code to recover the XMLDoc is the following:

 
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()
m.ltInit=SECONDS()
PUBLIC leResult
*************/ this is very fast, less than a second even with 20.000 records/********
leResult = lowsrUsuario.metConsultaSaldo()

loArturo = THISFORM.DATAENVIRONMENT.cursoradapter1

WITH loArturo
.DATASOURCETYPE = 'XML'
.SELECTCMD = m.leResult.ITEM(0).XML
.ALIAS = 'ca_xmlarturo'
ENDWITH
******* fill the cursor *************
***********/the problem is here with 5000 records takes 1 minute to fill the cursor /********
IF loArturo.CURSORFILL()
m.ltFin=SECONDS()
THISFORM.grid1.RECORDSOURCE= 'ca_xmlarturo'
THISFORM.grid1.AUTOFIT()
THISFORM.REFRESH()
m.lntotal=m.ltFin-m.ltInit
MESSAGEBOX(m.lntotal)
ELSE
MESSAGEBOX('No se pudo cargar el cursor')
ENDIF

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


Thanks for your help

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

Click here to load this message in the networking platform