G
Guest
Hello,
I am using vb.net and trying to write a local copy of a strongly typed
dataset as a diffgram when the user is offline, so that when they connect to
the server again their changes can be sent back. I am writing the diffgram
using:
dataset.writexml(filename,xmlwritemode.diffgram).
If I load the original data from the server, then write it as a diffgram,
then exit, then run the program again (this time offline) and load the
diffgram, all works fine. However, if I then write the diffgram again, from
the same dataset but this time with the local copy of the data (which has
just been loaded from the diffgram), then exit, then run the program again
and try and load the diffgram I get an xmlexception with errorcode
"Xml_badnamechar" and the message "The ':' character, hexadecimal value 0x3A,
cannot be included in a name. Line 9983, position 49."
This is presumably because one of my field names includes a ':' (which I now
suspect may have been a mistake!). But why does it not cause a problem the
first time round, and is there anyway of making writexml encode the offending
characters?
I would be very grateful for any help,
Edward Murray
I am using vb.net and trying to write a local copy of a strongly typed
dataset as a diffgram when the user is offline, so that when they connect to
the server again their changes can be sent back. I am writing the diffgram
using:
dataset.writexml(filename,xmlwritemode.diffgram).
If I load the original data from the server, then write it as a diffgram,
then exit, then run the program again (this time offline) and load the
diffgram, all works fine. However, if I then write the diffgram again, from
the same dataset but this time with the local copy of the data (which has
just been loaded from the diffgram), then exit, then run the program again
and try and load the diffgram I get an xmlexception with errorcode
"Xml_badnamechar" and the message "The ':' character, hexadecimal value 0x3A,
cannot be included in a name. Line 9983, position 49."
This is presumably because one of my field names includes a ':' (which I now
suspect may have been a mistake!). But why does it not cause a problem the
first time round, and is there anyway of making writexml encode the offending
characters?
I would be very grateful for any help,
Edward Murray