![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Version: Sybase 12.5.1 I have a table with a varbinary(255) field. When i try to insert this varbinary "0x0400010000" in my table, i can see thet last two bytes are inesistent. select my_field from my tables go I have this output: 0x040001 Why???How can i solve this problem??? Thanks in Advance. |
#3
| |||
| |||
|
|
select bintostr (my_field) from ... may solve your problem. I'm not sure as to when this function became available. "FCA" <marakaimbo (AT) libero (DOT) it> wrote in message news:c4u5jc$2l1cr2$1 (AT) ID-110320 (DOT) news.uni-berlin.de... Version: Sybase 12.5.1 I have a table with a varbinary(255) field. When i try to insert this varbinary "0x0400010000" in my table, i can see thet last two bytes are inesistent. select my_field from my tables go I have this output: 0x040001 Why???How can i solve this problem??? Thanks in Advance. |
#4
| |||
| |||
|
|
Tahnk yuo "Carl Kayser" But this is not my problem. My problem is that, when I try to insert a virbinary that have last byte to 00 i have this situation: insert into my_table select 0x0400010000 go select * from my_table go my_field --------- 0x040001 where is 0000? |
#5
| |||
| |||
|
|
Tahnk yuo "Carl Kayser" But this is not my problem. My problem is that, when I try to insert a virbinary that have last byte to 00 i have this situation: insert into my_table select 0x0400010000 go select * from my_table go my_field --------- 0x040001 where is 0000? "Carl Kayser" <kayser_c (AT) bls (DOT) gov> wrote in message news:c4uajp$ats$1 (AT) blsnews (DOT) bls.gov... select bintostr (my_field) from ... may solve your problem. I'm not sure as to when this function became available. "FCA" <marakaimbo (AT) libero (DOT) it> wrote in message news:c4u5jc$2l1cr2$1 (AT) ID-110320 (DOT) news.uni-berlin.de... Version: Sybase 12.5.1 I have a table with a varbinary(255) field. When i try to insert this varbinary "0x0400010000" in my table, i can see thet last two bytes are inesistent. select my_field from my tables go I have this output: 0x040001 Why???How can i solve this problem??? Thanks in Advance. |
#6
| |||
| |||
|
|
But this is not my problem. My problem is that, when I try to insert a virbinary that have last byte to 00 i have this situation: |
#7
| |||
| |||
|
|
Version: Sybase 12.5.1 I have a table with a varbinary(255) field. When i try to insert this varbinary "0x0400010000" in my table, i can see thet last two bytes are inesistent. select my_field from my tables go I have this output: 0x040001 Why???How can i solve this problem??? Thanks in Advance. |
#8
| |||
| |||
|
|
On Tue, 06 Apr 2004 16:53:30 +0200, FCA wrote: Tahnk yuo "Carl Kayser" But this is not my problem. My problem is that, when I try to insert a virbinary that have last byte to 00 i have this situation: insert into my_table select 0x0400010000 go select * from my_table go my_field --------- 0x040001 where is 0000? It got truncated. That "bug" has been around in Sybase since 4.0 - I remember hitting it when storing a string of bytes as a varbinary and losing any trailing NULL bytes. I worked around it by putting an end marker (I think I used 0x7f) as the last byte of the string, and have my front end clean it up as needed. Personally I think this is a bug - a varbinary should store what you give it, trailing null bytes included. You may want to open a case with Sybase Tech Support. Michael |
![]() |
| Thread Tools | |
| Display Modes | |
| |