Hi,
I'm using the method "SaveToXML" in TMyQuery and the XML is created correctly. I have a table with a boolean field, so in the XML is generated as "yes" or "no", like:
<xml>
...
NameField="yes"
...
The problem is that at a later time, I'm loading the XML into a table via MySQL, using a SQL query as:
"LOAD XML LOCAL INFILE 'my_xml.xml' INTO TABLE MyTable...."
And it seems that the Boolean values are not loaded correctly. It seems that the above query requires in the XML the boolean fields as "1" or "0" (not "True" or "False"). If I manually change in the XML the strings "True" by "1" (and "False" by "0"), the boolean values are loaded correctly into the table.
Am I missing something or an extra parameter to set?
Thanks!
			
									
									
						Writing/Reading boolean field in XML
Re: Writing/Reading boolean field in XML
To solve the problem, please set the TMyQuery.Options.EnableBoolean property to False before calling the TMyQuery.SaveToXML method.
You can find more details in the MyDAC help: http://www.devart.com/mydac/docs/index. ... oolean.htm
			
									
									
						You can find more details in the MyDAC help: http://www.devart.com/mydac/docs/index. ... oolean.htm
Re: Writing/Reading boolean field in XML
Thanks a lot! Really appreciated!
			
									
									
						Re: Writing/Reading boolean field in XML
It is good to see that the problem has been solved. Feel free to contact us if you have any further questions.