Well, according to the standard that field should have a text affinity.

http://www.sqlite.org/datatype3.html#determination_of_column_affinity

And using single quotes makes what you're giving it text values rather than 
blobs

http://www.sqlite.org/lang_expr.html
"A string constant is formed by enclosing the string in single quotes ('). A 
single quote within the string can be encoded by putting two single quotes in a 
row - as in Pascal. C-style escapes using the backslash character are not 
supported because they are not standard SQL.

BLOB literals are string literals containing hexadecimal data and preceded by a 
single "x" or "X" character. Example: X'53514C697465'"

So my not-expert opinion is that SQLite Expert is doing something weird.


-----Original Message-----
From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On 
Behalf Of Stephen Chrzanowski
Sent: Tuesday, February 20, 2018 11:22 AM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] Clarification on Storage

That was NOT supposed to happen. :P

CREATE TABLE [Test](
    [ID] INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
    [T1] TEXT,
    [T2] BLOB_TEXT);

insert into Test (T1,T2) values ('Test 1','Test 2');

In SQLite Expert, it hides "Test 2" as a (blob).  I'm fine with that.
In SQLITE3.exe, it shows "Test 2".  I'm also fine with that.

What I'm not entirely sure of is whether SQLite Expert is understanding and
handling the BLOB_TEXT field and just not doing the actual query to get the
text, or, if it understand if there is some kind of special handling that
SQLite Expert is not doing and just shows (blob).

The reason I'm asking is that I've got an application that handles bulk
text inserts, and I want to make sure that I don't run into some kind of
stupid (My code, not SQLite) limitation that'd chop text out, or what have
you.

On Tue, Feb 20, 2018 at 11:17 AM, Stephen Chrzanowski <pontia...@gmail.com>
wrote:

> I'm fully aware that any kind of data can be stored in any kind of field.
> Strings can be in integer declared fields, etc.
>
> What I'm interested in finding out, without changing my code at this time,
> is if SQLITE3.EXE is handling things differently than what SQLite Expert is.
>
> In "SQLite Expert", if I declare a field as BLOB or BLOB_TEXT, the UI
> itself "hides" the information pending certain declaration types on the
> tables field.  SQLITE3.EXE does not.
>
> Case in point:
>
>
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to