Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CursorToXml and BinToC strings
Message
From
31/03/2002 03:26:30
Jean-Pierre Overbeek
New Limit Database Solutions
Amsterdam, Netherlands
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00639151
Message ID:
00639246
Views:
40
>>>>Hi,
>>>>
>>>>Is it possible to use the new XML functions with strings generated by BinToC?
>>>>
>>>>I have a cursor with concatenated foreign key values (BinToC(iKey1)+BinToC(iKey2) as cKey). Now I would like to store the cursor as XML, and convert it back, but the low ASCII characters generated by BinToC are not stored correctly. Using the WestWind class wwXml generates the XML correctly, but I get an error in wwXml.XmlToCursor.
>>>>
>>>>What are the correct parameters for XmlToCursor?
>>>>
>>>>create cursor curTest (cKey c(4), iKey i)
>>>>insert into curTest values (BinToC(1),1)
>>>>lcXml=''
>>>>CursorToXML('curTest','lcXml',0,0+16,0,'1')
>>>>? lcXml
>>>>delete from curTest
>>>>XMLToCursor(lcXml,'curTest')
>>>>? curTest.cKey, CToBin(curTest.cKey), curTest.iKey && Output €, 2105376, 1 :-(
>>>>
>>>>TIA
>>>>Happy Easter,
>>>>Jean-Pierre
>>>
>>>See if Message #588522 would be of any help to you.
>>
>>Hi,
>>
>>Thanx for the reply. I have added an alter table, but without succes...
>>Jean-Pierre.
>
>This works
create cursor curTest (cKey c(4) nocptrans, iKey i)
>insert into curTest values (BinToC(1),1)
>ALTER TABLE curTest ALTER COLUMN cKey M NOCPTRANS
>lcXml=''
>CursorToXML('curTest','lcXml',1,0,0,'1')
>XMLToCursor(lcXml,'curTest1')
>ALTER TABLE curTest1 ALTER COLUMN cKey C(4) NOCPTRANS
>? curTest1.cKey, CToBin(curTest1.cKey), curTest1.iKey
>
Hi Sergey,
Sorry, but I got here a return value of -1.6085E+9!!!!
The cKey value is stored as gAAAAq== in the XML.
What m I missing? A setting, or a???
Thanx.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform