Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using XMLAdapter or CA with XML as DataSourceType
Message
De
19/05/2005 20:34:05
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows 2000 SP4
Database:
Visual FoxPro
Divers
Thread ID:
01009080
Message ID:
01016077
Vues:
15
Hi Geoff,

Refer to documentation for CursorFill() method, nOptions parameter in particular.

Thanks,
Aleksey.

>I copied the xml from this thread and created a file called "test.xml"
>
>I then ran the code below. For some reason it is not working. Looking at AERROR() I discover that the CursorAdaptor is returning .F. for oCA.CursorFill(.T.) and that I am getting an
>
>
>1435 - XML Parse error : Invalid at the top level of the document
> Line 1, Position 1. e:\alpha\test.xml
>
>
>I am trying to figure out cursor adapters with an XML files
>
>Regards
>Geoff
>
>>What did you try and why?
>>
>>>
>>>I have tried this and am not getting any cursor. Any ideas why?
>>>
>>>Regards
>>>Geoff Scott
>>>
>>>>Hi Mark,
>>>>
>>>>Try
oCA = CREATEOBJECT("CursorAdapter")
>>>>oCA.Alias = "TestXml"
>>>>oCA.DataSourceType = "XML"
>>>>oCA.CursorSchema = "oldsku V(10), newsku V(10)"
>>>>oCA.SelectCmd = "test.xml"        && The name of memo field
>>>>oCA.CursorFill(.t.)
>>>>...
>>>>SKIP IN test
>>>>oCA.CursorRefresh()
>>>>
>>>>
>>>>>Let's say I have an XML file that looks like:
>>>><snip>>
>>>>>The VFP Help file is not very helpful in examples for either using the XMLAdapter or a CursorAdapter with the DataSourceType set to XML. What I need to do is be able to load this XML into a cursor for display purposes only. This XML data is in the memo field of a VFP table, so as I skip through the records, I would like to "reload" the adapter with the new data from the XML information. This will all be read only so updating will not be necessary. I do not particularly want to go the XMLTOCURSOR route if possible as I think a "CursorRefresh" would be more efficient. I would also like to specify the cursor schema to be V(10) for both of those fields. TIA!
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform