List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:June 29 2000 1:10am
Subject:Re: How can i store zero in a blob
View as plain text  
At 9:15 PM +0200 2000-06-28, Erdei Béla wrote:
>My problem is the following:
>
>1.  I want to store the following value in a blob:  "Hello World \0 ,and
>Moon !!"  .
>2.  I send the query to the server to do it.
>3. Done.
>4. Now,I want to check it!
>5. I send the query to the server to do it.
>6. Done
>7. The result will be "Hello World".     Tis is the problem!!!!!!
>
>The SQL treats the string above as a Null-Terminated string,but I think it
>should not.
>
>I need to store binary values in a blob,but this way, it seems, I can not if
>there is any binary null in the data !!
>What is the way to do it?


Stick a backslash in front of the null byte to escape it.

-- 
Paul DuBois, paul@stripped
Thread
How can i store zero in a blobErdei Béla28 Jun
  • Re: How can i store zero in a blobPaul DuBois29 Jun
    • Re: How can i store zero in a blobJeremy Cole29 Jun