Hi,

Please look at this page:
http://www.sqlite.org/datatypes.html
Quote from the page:
"SQLite is "typeless". This means that you can store any kind of data
you want in any column of any table, regardless of the declared
datatype of that column"

Look at Section 4 of the attached page.

May be you can try, the || operator with an empty string. Or, separate
the + sign from the number and use something like "+"||"39123123"
while inserting

Regards
Sarwar Erfan


On Jul 25, 4:12 am, Federico Paolinelli <fedep...@gmail.com> wrote:
> I spent a lot of time on this.
>
> I was trying to store an incoming call number in sqlite. I'm in Italy,
> so the number was something like +39123123.
>
> What happened was that after putting and removing it from sqlite as a
> string , the leading "+" was gone.
>
> In the table creation the record is a string.
> I call ContentValues.put(String, String) and then I get the value from
> the cursor using getString().
>
> Moreover; I tried to put something before the "+", like "aa+39123123",
> the query returns the expected value. I suspect that for some reason
> sqlite converts the String to a number, and when returns it back the +
> is not given back.
>
> What I think I am going to do (even if I am disgusted) is to add
> something to the string and remove it later.
>
> Anyway, does anybody has an explanation??
> Many thanks in advance,
>
> Federico

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to