RE: Re[4]: [sqlite] Re: Re: Handling null characters in blob data

2006-11-15 Thread Shivshankar Subramani - TLS , Chennai
Hi Teg,

Thanks for your snipet!

With Regards,


SHIVSHANKER S.


HCL Technologies Limited,  

Chennai-600058
Tel: +91-44-43935000 

Extn-5029 Mobile-9884656906
Email: [EMAIL PROTECTED]



-Original Message-
From: Teg [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 15, 2006 7:22 PM
To: Shivshankar Subramani - TLS , Chennai
Subject: Re[4]: [sqlite] Re: Re: Handling null characters in blob data


Hello Chennai,

Wednesday, November 15, 2006, 3:09:08 AM, you wrote:

SSTC> Hey I guess you should know more of compression algorithm before u 
SSTC> call one stupid

SSTC> With Regards,


SSTC> SHIVSHANKER S.


SSTC> HCL Technologies Limited,

SSTC> Chennai-600058
SSTC> Tel: +91-44-43935000

SSTC> Extn-5029 Mobile-9884656906
SSTC> Email: [EMAIL PROTECTED]



SSTC> -Original Message-
SSTC> From: Gussimulator [mailto:[EMAIL PROTECTED]
SSTC> Sent: Wednesday, November 15, 2006 12:34 PM
SSTC> To: sqlite-users@sqlite.org
SSTC> Subject: Re: Re[2]: [sqlite] Re: Re: Handling null characters in blob
data


SSTC> What kind of compression algorithm leaves out null characters? every
char
SSTC> will be taking a byte, its just stupid.



SSTC> ----- Original Message - 
SSTC> From: "Shivshankar Subramani - TLS , Chennai" <[EMAIL PROTECTED]>
SSTC> To: 
SSTC> Sent: Wednesday, November 15, 2006 2:02 AM
SSTC> Subject: RE: Re[2]: [sqlite] Re: Re: Handling null characters in blob
data


SSTC> Hi Teg,

SSTC> Can u please send me the sample code

SSTC> Thanks in advance

SSTC> With Regards,


SSTC> SHIVSHANKER S.


SSTC> HCL Technologies Limited,

SSTC> Chennai-600058
SSTC> Tel: +91-44-43935000

SSTC> Extn-5029 Mobile-9884656906
SSTC> Email: [EMAIL PROTECTED]



SSTC> -Original Message-
SSTC> From: Teg [mailto:[EMAIL PROTECTED]
SSTC> Sent: Wednesday, November 15, 2006 3:26 AM
SSTC> To: Shivshankar Subramani - TLS , Chennai
SSTC> Subject: Re[2]: [sqlite] Re: Re: Handling null characters in blob data


SSTC> Hello Chennai,

SSTC> Tuesday, November 14, 2006, 9:20:10 AM, you wrote:


SSTC>> Hi,

SSTC>> Actually im trying to store a compressed value,which has lots of
SSTC>> null characters.When I try to store it into the database as a blob
SSTC>> item ,only the characters before null gets stored rest does not.I
SSTC>> want to store the entire compressed buffer. Is it possible?

SSTC>> BLOB Data stored in the table ->PK...

SSTC>> Expected data to be stored
SSTC>>   PK.
SSTC>>   ...Ɲn5
SSTC>>   n»(tm)g..
SSTC>>   .è.
SSTC>>   ..simpl
SSTC>>   e.datUT
SSTC>>   ...û.ZE
SSTC>>   û.ZEû.Z
SSTC>>   Eí'KNÃ0
SSTC>>   .?S6Hoe
SSTC>>   Eå}ã.6U
SSTC>>   "¤B¨HHå
SSTC>>   !õ..6n2
SSTC>>   ¤-.ÇÄN"
SSTC>>   r..ì8DO
SSTC>>   .â.E¤Í£
SSTC>>   [EMAIL PROTECTED]
SSTC>>   è÷÷..«
SSTC>>   Y.¬½EURHÒ
SSTC>>   Û¨«.¨.
SSTC>>   Ü.=Ê}.M
SSTC>>   Æg.ê;.
SSTC>>   .-fº|lg
SSTC>>   p-®N®;






SSTC>> Shivshankar Subramani - TLS , Chennai 
SSTC>> <[EMAIL PROTECTED]> wrote:
>>> I did follow the procedure to store the blob data.I have no problem
>>> in excuting it but my problem is that when my data is of the below
>>> type in memory

SSTC>> [snip]

>>> Where there are lots of null character in the buffer the sqlite fails
>>> to take them as values

SSTC>> What makes you think so? Exactly what are you doing, what results
SSTC>> do you expect, what results do you get, and how the two differ?

SSTC>> Igor Tandetnik


SSTC>>
SSTC>

SSTC>> -
SSTC>> To unsubscribe, send email to
SSTC>> [EMAIL PROTECTED]
SSTC>>
SSTC>

SSTC>> -
SSTC>> DISCLAIMER
SSTC>> The contents of this e-mail and any attachment(s) are confidential
SSTC>> and intended for the

SSTC>> named recipient(s) only. It shall not attach any liability on the
SSTC>> originator or HCL or its

SSTC>> affiliates. Any views or opinions presented in this email are 
SSTC>> solely those of the author and

SSTC>> may not necessarily reflect the opinions of HCL or its affiliates.
SSTC>> Any form of reproduction,

SSTC>> dissemination, copying, disclosure, modification, distribution and
SSTC>> / or publication of this

SSTC>> message without the prior written consent of the author of this
SSTC>> e-mail
SSTC> is strictly

SSTC>> prohibited. If you have received this email in error please delete
SSTC>> it and notify the sender

SSTC>> immediately. Before opening any mail and 

RE: Re[2]: [sqlite] Re: Re: Handling null characters in blob data

2006-11-15 Thread Shivshankar Subramani - TLS , Chennai
Hey I guess you should know more of compression algorithm before u call one
stupid

With Regards,


SHIVSHANKER S.


HCL Technologies Limited,  

Chennai-600058
Tel: +91-44-43935000 

Extn-5029 Mobile-9884656906
Email: [EMAIL PROTECTED]



-Original Message-
From: Gussimulator [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 15, 2006 12:34 PM
To: sqlite-users@sqlite.org
Subject: Re: Re[2]: [sqlite] Re: Re: Handling null characters in blob data


What kind of compression algorithm leaves out null characters? every char 
will be taking a byte, its just stupid.



- Original Message - 
From: "Shivshankar Subramani - TLS , Chennai" <[EMAIL PROTECTED]>
To: 
Sent: Wednesday, November 15, 2006 2:02 AM
Subject: RE: Re[2]: [sqlite] Re: Re: Handling null characters in blob data


Hi Teg,

Can u please send me the sample code

Thanks in advance

With Regards,


SHIVSHANKER S.


HCL Technologies Limited,

Chennai-600058
Tel: +91-44-43935000

Extn-5029 Mobile-9884656906
Email: [EMAIL PROTECTED]



-Original Message-
From: Teg [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 15, 2006 3:26 AM
To: Shivshankar Subramani - TLS , Chennai
Subject: Re[2]: [sqlite] Re: Re: Handling null characters in blob data


Hello Chennai,

Tuesday, November 14, 2006, 9:20:10 AM, you wrote:


SSTC> Hi,

SSTC> Actually im trying to store a compressed value,which has lots of 
SSTC> null characters.When I try to store it into the database as a blob 
SSTC> item ,only the characters before null gets stored rest does not.I 
SSTC> want to store the entire compressed buffer. Is it possible?

SSTC> BLOB Data stored in the table ->PK...

SSTC> Expected data to be stored
SSTC>   PK.
SSTC>   ...Ɲn5
SSTC>   n»(tm)g..
SSTC>   .è.
SSTC>   ..simpl
SSTC>   e.datUT
SSTC>   ...û.ZE
SSTC>   û.ZEû.Z
SSTC>   Eí'KNÃ0
SSTC>   .?S6Hoe
SSTC>   Eå}ã.6U
SSTC>   "¤B¨HHå
SSTC>   !õ..6n2
SSTC>   ¤-.ÇÄN"
SSTC>   r..ì8DO
SSTC>   .â.E¤Í£
SSTC>   [EMAIL PROTECTED]
SSTC>   è÷÷..«
SSTC>   Y.¬½EURHÒ
SSTC>   Û¨«.¨.
SSTC>   Ü.=Ê}.M
SSTC>   Æg.ê;.
SSTC>   .-fº|lg
SSTC>   p-®N®;






SSTC> Shivshankar Subramani - TLS , Chennai 
SSTC> <[EMAIL PROTECTED]> wrote:
>> I did follow the procedure to store the blob data.I have no problem 
>> in excuting it but my problem is that when my data is of the below 
>> type in memory

SSTC> [snip]

>> Where there are lots of null character in the buffer the sqlite fails 
>> to take them as values

SSTC> What makes you think so? Exactly what are you doing, what results 
SSTC> do you expect, what results do you get, and how the two differ?

SSTC> Igor Tandetnik


SSTC>

SSTC> -
SSTC> To unsubscribe, send email to [EMAIL PROTECTED]
SSTC>

SSTC> -
SSTC> DISCLAIMER
SSTC> The contents of this e-mail and any attachment(s) are confidential 
SSTC> and intended for the

SSTC> named recipient(s) only. It shall not attach any liability on the 
SSTC> originator or HCL or its

SSTC> affiliates. Any views or opinions presented in this email are 
SSTC> solely those of the author and

SSTC> may not necessarily reflect the opinions of HCL or its affiliates. 
SSTC> Any form of reproduction,

SSTC> dissemination, copying, disclosure, modification, distribution and 
SSTC> / or publication of this

SSTC> message without the prior written consent of the author of this 
SSTC> e-mail
is strictly

SSTC> prohibited. If you have received this email in error please delete 
SSTC> it and notify the sender

SSTC> immediately. Before opening any mail and attachments please check 
SSTC> them for viruses and

SSTC> defect.

SSTC>

-
SSTC> To unsubscribe, send email to [EMAIL PROTECTED]
SSTC>

-

I store JPG files in Sqlite DB's without any issues. You can't treat them
like text though which is what it sounds like you're doing. You really have
two choices, encode them as text using something like UU, Mime or Sqlite's
built in encoding or used the advanced API calls to bind the binary data as
blobs when inserting and retrieving them using the same mechanism.

I use the later, compile the query with parameters and bind the blobs of
binary data after the fact before I insert.

It's all in the API documents. I can send you sample code if you wish.

-- 
Best regards,
 Tegmailto:[EMAIL PROTECTED]



RE: Re[2]: [sqlite] Re: Re: Handling null characters in blob data

2006-11-14 Thread Shivshankar Subramani - TLS , Chennai
Hi Teg,

Can u please send me the sample code

Thanks in advance

With Regards,


SHIVSHANKER S.


HCL Technologies Limited,  

Chennai-600058
Tel: +91-44-43935000 

Extn-5029 Mobile-9884656906
Email: [EMAIL PROTECTED]



-Original Message-
From: Teg [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 15, 2006 3:26 AM
To: Shivshankar Subramani - TLS , Chennai
Subject: Re[2]: [sqlite] Re: Re: Handling null characters in blob data


Hello Chennai,

Tuesday, November 14, 2006, 9:20:10 AM, you wrote:


SSTC> Hi,

SSTC> Actually im trying to store a compressed value,which has lots of 
SSTC> null characters.When I try to store it into the database as a blob 
SSTC> item ,only the characters before null gets stored rest does not.I 
SSTC> want to store the entire compressed buffer. Is it possible?

SSTC> BLOB Data stored in the table ->PK...

SSTC> Expected data to be stored
SSTC>   PK.
SSTC>   ...Ɲn5
SSTC>   n»(tm)g..
SSTC>   .è.
SSTC>   ..simpl
SSTC>   e.datUT
SSTC>   ...û.ZE
SSTC>   û.ZEû.Z
SSTC>   Eí'KNÃ0
SSTC>   .?S6Hoe
SSTC>   Eå}ã.6U
SSTC>   "¤B¨HHå
SSTC>   !õ..6n2
SSTC>   ¤-.ÇÄN"
SSTC>   r..ì8DO
SSTC>   .â.E¤Í£
SSTC>   [EMAIL PROTECTED]
SSTC>   è÷÷..«
SSTC>   Y.¬½EURHÒ
SSTC>   Û¨«.¨.
SSTC>   Ü.=Ê}.M
SSTC>   Æg.ê;.
SSTC>   .-fº|lg
SSTC>   p-®N®;






SSTC> Shivshankar Subramani - TLS , Chennai 
SSTC> <[EMAIL PROTECTED]> wrote:
>> I did follow the procedure to store the blob data.I have no problem 
>> in excuting it but my problem is that when my data is of the below 
>> type in memory

SSTC> [snip]

>> Where there are lots of null character in the buffer the sqlite fails 
>> to take them as values

SSTC> What makes you think so? Exactly what are you doing, what results 
SSTC> do you expect, what results do you get, and how the two differ?

SSTC> Igor Tandetnik


SSTC>

SSTC> -
SSTC> To unsubscribe, send email to
SSTC> [EMAIL PROTECTED]
SSTC>

SSTC> -
SSTC> DISCLAIMER 
SSTC> The contents of this e-mail and any attachment(s) are
SSTC> confidential and intended for the 

SSTC> named recipient(s) only. It shall not attach any
SSTC> liability on the originator or HCL or its 

SSTC> affiliates. Any views or opinions presented in this email
SSTC> are solely those of the author and 

SSTC> may not necessarily reflect the opinions of HCL or its
SSTC> affiliates. Any form of reproduction, 

SSTC> dissemination, copying, disclosure, modification,
SSTC> distribution and / or publication of this 

SSTC> message without the prior written consent of the author of this e-mail
is strictly

SSTC> prohibited. If you have received this email in error
SSTC> please delete it and notify the sender 

SSTC> immediately. Before opening any mail and attachments
SSTC> please check them for viruses and 

SSTC> defect.

SSTC>

-
SSTC> To unsubscribe, send email to
SSTC> [EMAIL PROTECTED]
SSTC>

-

I store JPG files in Sqlite DB's without any issues. You can't treat
them like text though which is what it sounds like you're doing. You
really have two choices, encode them as text using something like UU,
Mime or Sqlite's built in encoding or used the advanced API calls to
bind the binary data as blobs when inserting and retrieving them using
the same mechanism.

I use the later, compile the query with parameters and bind the blobs
of binary data after the fact before I insert.

It's all in the API documents. I can send you sample code if you wish.

-- 
Best regards,
 Tegmailto:[EMAIL PROTECTED]



-
To unsubscribe, send email to [EMAIL PROTECTED]

-

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



RE: [sqlite] Re: Re: Handling null characters in blob data

2006-11-14 Thread Shivshankar Subramani - TLS , Chennai

Hi,

Actually im trying to store a compressed value,which has lots of null
characters.When I try to store it into the database as a blob item ,only the
characters before null gets stored rest does not.I want to store the entire
compressed buffer.
Is it possible?

BLOB Data stored in the table ->PK...

Expected data to be stored
  PK.
  ...Ɲn5
  n»(tm)g..
  .è.
  ..simpl
  e.datUT
  ...û.ZE
  û.ZEû.Z
  Eí'KNÃ0
  .?S6Hoe
  Eå}ã.6U
  "¤B¨HHå
  !õ..6n2
  ¤-.ÇÄN"
  r..ì8DO
  .â.E¤Í£
  [EMAIL PROTECTED]
  è÷÷..«
  Y.¬½EURHÒ
  Û¨«.¨.
  Ü.=Ê}.M
  Æg.ê;.
  .-fº|lg
  p-®N®;






Shivshankar Subramani - TLS , Chennai
<[EMAIL PROTECTED]> wrote:
> I did follow the procedure to store the blob data.I have no problem in 
> excuting it but my problem is that when my data is of the below type 
> in memory

[snip]

> Where there are lots of null character in the buffer the sqlite fails 
> to take them as values

What makes you think so? Exactly what are you doing, what results do you 
expect, what results do you get, and how the two differ?

Igor Tandetnik 



-
To unsubscribe, send email to [EMAIL PROTECTED]

-
DISCLAIMER 
The contents of this e-mail and any attachment(s) are confidential and intended 
for the 

named recipient(s) only. It shall not attach any liability on the originator or 
HCL or its 

affiliates. Any views or opinions presented in this email are solely those of 
the author and 

may not necessarily reflect the opinions of HCL or its affiliates. Any form of 
reproduction, 

dissemination, copying, disclosure, modification, distribution and / or 
publication of this 

message without the prior written consent of the author of this e-mail is 
strictly 

prohibited. If you have received this email in error please delete it and 
notify the sender 

immediately. Before opening any mail and attachments please check them for 
viruses and 

defect.

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



RE: [sqlite] Re: Handling null characters in blob data

2006-11-13 Thread Shivshankar Subramani - TLS , Chennai
Hi Igor Tandetnik,

I did follow the procedure to store the blob data.I have no problem in
excuting it but my problem is that when my data is of the below type in
memory
PK.
...¸Zn5
>À~Õe..
.è.
..simpl
e.datUT
...¨¦YE
¨¦YE¨¦Y
í'KNÃ0
.?S6Hoe
*}ã.6U..

Where there are lots of null character in the buffer the sqlite fails to
take them as values and hence im having difficulty in storing this kind of
buffer.

With Regards,

SHIVSHANKER S.
HCL Technologies Limited,  
Chennai-600058
Tel: +91-44-43935000 
Extn-5029 Mobile-9884656906
Email: [EMAIL PROTECTED]



-Original Message-
From: Igor Tandetnik [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 13, 2006 10:00 PM
To: SQLite
Subject: [sqlite] Re: Handling null characters in blob data


Shivshankar Subramani - TLS , Chennai
<[EMAIL PROTECTED]> wrote:
> Hi all,
>
>> SQLite version 2.8 and earlier could not (easily) store binary data - 
>> data with embedded \000 characters.  Thus the encode/decode routines 
>> were provide to transform data so that it contained no \000 
>> characters.
>>
>> SQLite version 3.0 can store binary data without difficulty.
>
> This is what  I read in the site 
> <http://www.mail-archive.com/[EMAIL PROTECTED]
> c.gmane.org/msg04332.html>
>
http://www.mail-archive.com/[EMAIL PROTECTED]
.org/msg04332.html
> . but
> i am having difficulty in storing data with null characters in it.Is
> there
> any specific method in which i can solve this problem?

Use a parameterized query, e.g.

update tablename set blobfield=:blob where id=:id

Use sqlite3_prepare / sqlite3_step / sqlite3_finalize to execute such a 
query. Use sqlite3_bind_blob to bind a binary buffer to BLOB parameter.

Igor Tandetnik 



-
To unsubscribe, send email to [EMAIL PROTECTED]

-
DISCLAIMER 
The contents of this e-mail and any attachment(s) are confidential and intended 
for the 

named recipient(s) only. It shall not attach any liability on the originator or 
HCL or its 

affiliates. Any views or opinions presented in this email are solely those of 
the author and 

may not necessarily reflect the opinions of HCL or its affiliates. Any form of 
reproduction, 

dissemination, copying, disclosure, modification, distribution and / or 
publication of this 

message without the prior written consent of the author of this e-mail is 
strictly 

prohibited. If you have received this email in error please delete it and 
notify the sender 

immediately. Before opening any mail and attachments please check them for 
viruses and 

defect.

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



[sqlite] Handling null characters in blob data

2006-11-13 Thread Shivshankar Subramani - TLS , Chennai
Hi all,
 
> SQLite version 2.8 and earlier could not (easily) store binary
> data - data with embedded \000 characters.  Thus the encode/decode
> routines were provide to transform data so that it contained no
> \000 characters.
>
> SQLite version 3.0 can store binary data without difficulty.

This is what  I read in the site

http://www.mail-archive.com/sqlite-users@sqlite.org/msg04332.html  . but
i am having difficulty in storing data with null characters in it.Is there
any specific method in which i can solve this problem?
 
Thanks in advance
 

With Regards,


SHIVSHANKER S.


HCL Technologies Limited,  

Chennai-600058
Tel: +91-44-43935000 

Extn-5029 Mobile-9884656906
Email: [EMAIL PROTECTED]  

 
DISCLAIMER 
The contents of this e-mail and any attachment(s) are confidential and intended 
for the 

named recipient(s) only. It shall not attach any liability on the originator or 
HCL or its 

affiliates. Any views or opinions presented in this email are solely those of 
the author and 

may not necessarily reflect the opinions of HCL or its affiliates. Any form of 
reproduction, 

dissemination, copying, disclosure, modification, distribution and / or 
publication of this 

message without the prior written consent of the author of this e-mail is 
strictly 

prohibited. If you have received this email in error please delete it and 
notify the sender 

immediately. Before opening any mail and attachments please check them for 
viruses and 

defect.