Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
XmlToCursor()
Message
De
07/09/2001 11:11:25
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00552820
Message ID:
00553817
Vues:
27
>XMLTOCURSOR() is not designed to work with ADO style XML. It works only with a specific schema such as the one exported by CursorToXML. It will handle data that is in similar format, but it will guess at the data. ADO XML uses its own internal schema and those are incompatible. Somebody mentioned that this is supposed to work with ADO recordsets but I haven't been able to make it work, so I don't think it does work that way...
>
>XMLToCursor works with URLs or file references but not with streams...
>
>+++ Rick ---
>

Rick,
Maybe I'm missing something but these all work for me :
oRecordset  = NewObject("adodb.recordset")
oConnection = NewObject("adodb.connection")
oStream     = NewObject("adodb.stream")
xDOM = NEWOBJECT('MSXML.DOMDocument')

With oConnection
  .ConnectionString = 'Provider=SQLOLEDB.1;User Id=sa;Data Source=cetin\cetin;Trusted_connection=Yes'
  .Open
Endwith
oRecordset.Open("SELECT * from pubs.dbo.titles", oConnection )

*Works too
*oRecordSet.Save(oStream, 1)
*XMLTOCURSOR(oStream.ReadText, "MyCursorName", 1028)

oRecordSet.Save(xdom, 1)
XMLTOCURSOR(xdom.xml, "MyCursorName", 1028)

SELECT MyCursorName
browse
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