Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Blank date field causes error when read into dataset
Message
 
 
To
All
General information
Forum:
ASP.NET
Category:
XML
Title:
Blank date field causes error when read into dataset
Miscellaneous
Thread ID:
00707919
Message ID:
00707919
Views:
66
From my a VFP7 COM component, I have passed an XML string created from a cursor with
= CURSORTOXML("cResult","lcXMLResult",1,0,0,"1")

If a date field in the cursor is blank, I get an error when I load the XML into a dataset using ReadXML in my asp.net page. Code is:
lcXML = oClinserv.GetRecord(lnParentID);
loStream = new StringReader(lcXML);
loXmlTextReader = new XmlTextReader(loStream);
dsClinserv.ReadXml(loXmlTextReader,XmlReadMode.ReadSchema);	
Error message is "String was not recognized as a valid DateTime." How can I prevent this error from happening and allow the XML string to be read into the dataset?
Next
Reply
Map
View

Click here to load this message in the networking platform