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. Downloading apk to Nexus One from local webserver

When developing for the G1 I set up a local apache site to serve APK's
and pointed the G1 browser to it. The server is on my local P and the
G1 connects via Wifi on its direct IP. The mime types was set up, and
the G1 downloads and installs them fine - these are all signed with
the public key. When I try this with the N1 browser it sees the site
fine but at the point at which the download starts it hangs - I just
see "Waiting for data connection" in the browsers download page. It
does this with the same APK the G1 downloads and installs fine with -
anyone know whats wrong here please?

Android Academy http://www.androidacademy.com


2. Is it possible direct users to a settings screen?

If one had an application that needed to know its location, and the
location sensors were disabled,
is it possible to encourage a user to re-enable and then give them a
click-through to an android settings screen?



3. Fundamental Question

4. detecting virtual sd card

5. Dream G2

6. Data Words to feed a AutoCompleteListView ?

7. Style/Theme XML attributes