RE: [sqlite] Problem inserting blob

2007-08-31 Thread Prakash Reddy Bande
OK,

I figured it out X should be followed by only hex characters 0-9, a-f.

Regards,

Prakash Reddy Bande
Altair Engg. Inc,
Troy, MI

-Original Message-
From: Prakash Reddy Bande [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 31, 2007 4:00 PM
To: sqlite-users@sqlite.org
Subject: [sqlite] Problem inserting blob

Hi,

I am trying to insert blob in a sqlite database using sqlite.exe .

create table t (x blob);

insert into t values (x'ccaaffee');

insert into t values (x'ccaa-ffee'); // This line give the error SQL
error: unrecognized token: "x'ccaa"

 

Where am I going wrong? 

 

Regards,

 

Prakash Reddy Bande

Altair Engg. Inc,

Troy, MI

 


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



Re: [sqlite] Problem inserting blob

2007-08-31 Thread Cesar D. Rodas
insert into t values ("x'ccaa-ffee'");
or
insert into t values ('x''ccaa-ffee''');
What you wanna insert must be between " or ' (''[double ' ] is the scape of
')

The cleanest way to do is compiling the query


On 31/08/2007, Prakash Reddy Bande <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I am trying to insert blob in a sqlite database using sqlite.exe .
>
> create table t (x blob);
>
> insert into t values (x'ccaaffee');
>
> insert into t values (x'ccaa-ffee'); // This line give the error SQL
> error: unrecognized token: "x'ccaa"
>
>
>
> Where am I going wrong?
>
>
>
> Regards,
>
>
>
> Prakash Reddy Bande
>
> Altair Engg. Inc,
>
> Troy, MI
>
>
>
>


-- 
Cesar D. Rodas
http://www.cesarodas.com/
Mobile Phone: 595 961 974165
Phone: 595 21 645590
[EMAIL PROTECTED]
[EMAIL PROTECTED]