Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
XmlToCursor()
Message
De
07/09/2001 12:25:00
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00552820
Message ID:
00553896
Vues:
20
>Hi Rick,
>
>Im new in those XML things. And i know you work a lot with XMLTOCURSOR() from WebConnection. I dont know but maybe u develop this function in WebConnection!?!
>
>Now, read the following an tell me what u think.
>
>*-----
>Your can use XMLTOCURSOR() with Stream but with the content of the object. In the doc on XMLTOCURSOR(), u can read this line:
>
>You also can specify return from a SOAP method call, XML from the XMLDOM, or an ADO stream".
>
>I read somewhere that the XMLDOM is not functional in C++, or VFP. Just in VB code. So it's not a great container for me. But Stream is working well.
>
>My only mistake is trying to use the object oStream directly in the first parameter. I have to use the ReadText method to acess text inside the oStream object. Just like this:
>
>
>   XMLTOCURSOR('oStream', "MyCursorName", 1028) && is wrong
>
>   XMLTOCURSOR(oStream.ReadText, "MyCursorName", 1028) && is the good line.
>
>
>This is working!
>
>Try the following little program
>
>
>oConnection	= NEWOBJECT("ADODB.Connection")
>oStream		= NEWOBJECT("ADODB.Stream")
>
>oConnection.Provider = "SQLOLEDB.1"
>oConnection.ConnectionString = ;
>	"Persist Security Info=False;User ID=sa;"+;
>	"Initial Catalog=Shipping;Data Source=FS01"
>oConnection.open
>
>oRecordSet	= NEWOBJECT("ADODB.RecordSet")
>lSelect = "SELECT * FROM CUSTOMER"
>oRecordSet.Open(lSelect, oConnection)
>
>oRecordSet.Save(oStream, 1)  && here i save the RS in XML in the oStream
>
>XMLTOCURSOR(oStream.ReadText, "MyCursorName", 1028) && Here Transform to cursor
>
>* Release objects
>SELECT MyCursorName
>BROWSE
>
>With a table of 40 records there is no problem. I have some tests to do with bigger tables today.
>
>I give u news on this,
>
>Thanks,
>
>Francois Durocher

Francois,
Rick knows something that I can miss easily I believe.
For working ones xmldom works too :) See my reply to Rick.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform