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,


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;
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

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. How to Create a 1x1 Widget Frame?

I suppose that this is more of a graphics question than an Android SDK
question but maybe I can get some help anyway.

I downloaded the 2x1 widget frame from the Developers Guidelines page.
This frame scales to 1x1 without an issue if I set the
minHeight/minWidget parameters accordingly in the providers file.

My problem is that the widget appears to have margins that are getting
in my way and the background is opaque.

How can I remove the margins from that widget (I want to display my text
centered horizontally and vertically but need more display area) and how
do I change the background to make it translucent?

I am working on a Ubuntu VirtualBox and tried working with Gimp but
could not figure anything out.

Can anyone point me in the right direction or, better yet, just point me
to a proper .png that I can use?


Jake Colman -- Android Tinkerer


2. Android: VoiceRecognition View Customization?

I'm using the sample code for Voice recognition
(VoiceRecognition.java) from the Android SDK Tools. I'm able to get
the "Speak Now" View to appear. Is there any way to customize that
view? For example, the buttons are the default silver and rollover is


3. dialogs in android and orientation change...

4. Device Administration the same as OMA DM support?

5. forde to open the Launcher, not the last Activity

6. totally 2d

7. Secure SDCard (MicroSD)