Hello Igor, Friday, January 18, 2008, 8:09:02 PM, you wrote:
IT> Lothar Scholz IT> <scholz-qqUfbLNYxjJCkLs28/[EMAIL PROTECTED]> wrote: >> it seems that "Lothar" is stored as a TEXT value but when i store >> X'4C6F74686172' it is a BLOB. >> What is the reason for it? IT> Same reason 1 is an integer literal but '1' is a string literal. IT> X'4C6F74686172' is a blob literal. Sorry as far as i understand the dynamics of datatypes they should depend on the bytes that are passed but not on the literal that is used for notation inside a textual SQL statement. Another question, how would you realiable represent contrl characters in the range 1-31 in a string? It is not really good to add them as plain code in text files and SQLite does not have C like backslash quoting. Especially the automatic %R%N->%N conversions might be a huge problem. And i don't think we should restrict the TEXT data type to anything more then non zero bytes. IT> What do you mean, data content? How is it supposed to know that a IT> particular sequence of bytes is supposed to represent a string, without IT> the help of mind-reading hardware? After all, you don't expect the IT> number 48 to be magically interpreted as a string '0'. You don't, right? Well if it looks like a number it is a number. If it does not look like a number it is either a TEXT or if it contains zero (or maybe non text control characters others then usually defined \f \v \r \n) it is a BLOB. This would make sense for me. IT> Use parameterized queries and approprite sqlite3_bind_* calls. This way IT> you unambiguously control the type of the value. I have to use for portability reasons UTF-8 sql text files. So i can't use a programming langauge API. -- Best regards, Lothar Scholz mailto:[EMAIL PROTECTED] ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------