Hi,
Here is my problem:
I'm using one table having 2 columns.
Col A has type varbinary(max)
Col B has type XML
I'm storing XML Data in ColB and and a byte array representing the
same XML data compressed in ColA.
The goal is of course to store only ColA data to save space.
If I display the content of ColB from a management studio query,
everything is perfectly displayed.
If I try to decompress and cast the result as XML, I get a "XML
parsing: line 1, character nnnnn, illegal xml character" error
message. The process is stuck on a string containing the char ...
The exact same string is perfectly displayed from ColB.
I tried storing and compressing the XML without encoding attribute,
with other encoding attribute, nothing helped.
Would someone have an advice?
Thanks,
Olivier
Can you write something more about your compression/decompression method?
Regards
Pawel Potasinski
[http://www.potasinski.pl]
Uzytkownik "oliviers" <olivier.sanzot@.gmail.com> napisal w wiadomosci
news:1185456328.444876.256200@.d55g2000hsg.googlegr oups.com...
Hi,
Here is my problem:
I'm using one table having 2 columns.
Col A has type varbinary(max)
Col B has type XML
I'm storing XML Data in ColB and and a byte array representing the
same XML data compressed in ColA.
The goal is of course to store only ColA data to save space.
If I display the content of ColB from a management studio query,
everything is perfectly displayed.
If I try to decompress and cast the result as XML, I get a "XML
parsing: line 1, character nnnnn, illegal xml character" error
message. The process is stuck on a string containing the char ...
The exact same string is perfectly displayed from ColB.
I tried storing and compressing the XML without encoding attribute,
with other encoding attribute, nothing helped.
Would someone have an advice?
Thanks,
Olivier
Showing posts with label varbinary. Show all posts
Showing posts with label varbinary. Show all posts
Friday, February 10, 2012
Cast as XML issue
Hi,
Here is my problem:
I'm using one table having 2 columns.
Col A has type varbinary(max)
Col B has type XML
I'm storing XML Data in ColB and and a byte array representing the
same XML data compressed in ColA.
The goal is of course to store only ColA data to save space.
If I display the content of ColB from a management studio query,
everything is perfectly displayed.
If I try to decompress and cast the result as XML, I get a "XML
parsing: line 1, character nnnnn, illegal xml character" error
message. The process is stuck on a string containing the char =B5...
The exact same string is perfectly displayed from ColB.
I tried storing and compressing the XML without encoding attribute,
with other encoding attribute, nothing helped.
Would someone have an advice?
Thanks,
OlivierCan you write something more about your compression/decompression method?
Regards
Pawel Potasinski
[http://www.potasinski.pl]
Uzytkownik "oliviers" <olivier.sanzot@.gmail.com> napisal w wiadomosci
news:1185456328.444876.256200@.d55g2000hsg.googlegroups.com...
Hi,
Here is my problem:
I'm using one table having 2 columns.
Col A has type varbinary(max)
Col B has type XML
I'm storing XML Data in ColB and and a byte array representing the
same XML data compressed in ColA.
The goal is of course to store only ColA data to save space.
If I display the content of ColB from a management studio query,
everything is perfectly displayed.
If I try to decompress and cast the result as XML, I get a "XML
parsing: line 1, character nnnnn, illegal xml character" error
message. The process is stuck on a string containing the char ...
The exact same string is perfectly displayed from ColB.
I tried storing and compressing the XML without encoding attribute,
with other encoding attribute, nothing helped.
Would someone have an advice?
Thanks,
Olivier
Here is my problem:
I'm using one table having 2 columns.
Col A has type varbinary(max)
Col B has type XML
I'm storing XML Data in ColB and and a byte array representing the
same XML data compressed in ColA.
The goal is of course to store only ColA data to save space.
If I display the content of ColB from a management studio query,
everything is perfectly displayed.
If I try to decompress and cast the result as XML, I get a "XML
parsing: line 1, character nnnnn, illegal xml character" error
message. The process is stuck on a string containing the char =B5...
The exact same string is perfectly displayed from ColB.
I tried storing and compressing the XML without encoding attribute,
with other encoding attribute, nothing helped.
Would someone have an advice?
Thanks,
OlivierCan you write something more about your compression/decompression method?
Regards
Pawel Potasinski
[http://www.potasinski.pl]
Uzytkownik "oliviers" <olivier.sanzot@.gmail.com> napisal w wiadomosci
news:1185456328.444876.256200@.d55g2000hsg.googlegroups.com...
Hi,
Here is my problem:
I'm using one table having 2 columns.
Col A has type varbinary(max)
Col B has type XML
I'm storing XML Data in ColB and and a byte array representing the
same XML data compressed in ColA.
The goal is of course to store only ColA data to save space.
If I display the content of ColB from a management studio query,
everything is perfectly displayed.
If I try to decompress and cast the result as XML, I get a "XML
parsing: line 1, character nnnnn, illegal xml character" error
message. The process is stuck on a string containing the char ...
The exact same string is perfectly displayed from ColB.
I tried storing and compressing the XML without encoding attribute,
with other encoding attribute, nothing helped.
Would someone have an advice?
Thanks,
Olivier
Cast and convert
How do I convert a colomn that is of data type varbinary to varchar so that the hex values saved there are shown as readable text usable with crystal reports.In SQL2K there is a function
master.dbo.fn_varbintohexstr (@.pbinin varbinary(8000) ) returns
nvarchar(4000)
Don't know why @.pbinin is varbinary(8000), since nvarchar(4000) can only
handle 2000 bytes!
It's just pretty simple code for doing the translation; if nvarchar(4000)
doesn't suit you, the source for the function is easy to modify (to create a
different function!)
"shaun" <shaun@.discussions.microsoft.com> wrote in message
news:F8EAF61A-2844-4C7C-BE22-46C72B9A7A77@.microsoft.com...
> How do I convert a colomn that is of data type varbinary to varchar so
that the hex values saved there are shown as readable text usable with
crystal reports.
master.dbo.fn_varbintohexstr (@.pbinin varbinary(8000) ) returns
nvarchar(4000)
Don't know why @.pbinin is varbinary(8000), since nvarchar(4000) can only
handle 2000 bytes!
It's just pretty simple code for doing the translation; if nvarchar(4000)
doesn't suit you, the source for the function is easy to modify (to create a
different function!)
"shaun" <shaun@.discussions.microsoft.com> wrote in message
news:F8EAF61A-2844-4C7C-BE22-46C72B9A7A77@.microsoft.com...
> How do I convert a colomn that is of data type varbinary to varchar so
that the hex values saved there are shown as readable text usable with
crystal reports.
Subscribe to:
Posts (Atom)