SQL Lite question, can you insert negative numbers

by Beth Mezias » Sat, 11 Jul 2009 07:04:52 GMT


Sponsored Links
 Hello,Can I get an (Android) example for getting signed numbers into a SQL
Lite database?  I've been trying many silly things that generate syntax
errors so I thought I could put out the question.  Note that I searched and
searched the groups and (surprisingly) found no history.
Thanks and regards,
Beth

--~--~---------~--~----~------------~-------~--~----~



SQL Lite question, can you insert negative numbers

by Mark Murphy » Sat, 11 Jul 2009 07:08:54 GMT


 


Outside of Android, here's a sqlite3 session:

SQLite version 3.6.10
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> create table foo (number real);
sqlite> .schema foo
CREATE TABLE foo (number real);
sqlite> insert into foo (number) values (-1);
sqlite> select * from foo;
-1.0
sqlite> .exit

Inside of Android, you should be able to just put a negative number into
your ContentValues that you supply to your insert() call with
SQLiteDatabase.

Can you provide any source code and the syntax errors you are getting?

-- 
Mark Murphy (a Commons Guy)
 http://commonsware.com  |  http://twitter.com/commonsguy 

Android Development Wiki:  http://wiki.andmob.org 

--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Other Threads

1. 2.6.27 branch and userspace

Hi!

I'm currently running fine kernel 2.6.28 with Android extracted from
the android kernel 2.6.27 branch, I replace all ocurrences of /sys/
android_power/ to /sys/power/ but it seems some files are gone, 2.6.25
have them at least.

So just asking if just replacing the ocurrences is enough or there is
more in context here and I should revert back to 2.6.25 android
functionality level?

And if the next version of Android userspace will support both kernels
functionality levels (2.6.25 and 2.6.27) ?

Thx!
--~--~---------~--~----~------------~-------~--~----~
unsubscribe: [EMAIL PROTECTED]
website: 

2. Can somebody explain how does the open core handle the selection between OPENMAX method and PV's own method?

It's exactly as Andrew described it. There are two codec registries,
one for vendor supplied codecs and one for OpenCore software codecs.
If it is unable to find a vendor codec that satisfies the input/output
requirements, it falls back to OpenCore software codec. The reason for
that is that you may need multiple instances of a codec at the same
time. If there are no vendor codecs, then there is only one registry.

Example: Imagine you are playing MP3 in the background and the user's
selected ringtone is an MP3 file. While the music is playing, the
phone rings. The MP3 player is probably using the hardware codec (it
usually consumes less power than software codec), so when the ringtone
starts up, the PV framework instantiates a software codec instead.





--~--~---------~--~----~------------~-------~--~----~
unsubscribe: [EMAIL PROTECTED]
website: 

3. Little sum...

4. Sending SMS messages

5. Availability

6. how does notepad_list and notes_row joined in Notepadv1

7. does anyone read the bug reports?