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. Play VideoView in LandScape Mode

Hi ,
How to play video in Default landscape mode?
give some example?

-- 

2. can not find - .so shared library

$make  modules Mbrick
or
make  -j4 PRODUCT-generic-eng

Error :
..
...
zipalign
target Strip: MCre (out/target/product/generic/obj/lib/MCre.so)
target SharedLib: Formats (out/target/product/generic/obj/
SHARED_LIBRARIES/Mbrick_intermediates/LINKED/Mbrick)
/home/xmen/mydroid/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/../
lib/gcc/arm-eabi/4.4.0/../../../../arm-eabi/bin/ld: cannot find -
lMCre.so
collect2: ld returned 1 exit status
make: *** [out/target/product/generic/obj/SHARED_LIBRARIES/
Mbrick_intermediates/LINKED/Mbrick] Error 1

Directory structure
   external/Myproject/
                            /Mcre
                            /Mbrick

 -mcre.so  builds success fully...i can find  Mcre.so files in /out .


Android.mk ( Mbrick)
LOCAL_PATH:= $(call my-dir)

include $(CLEAR_VARS)
LOCAL_SRC_FILES:= source files
LOCAL_C_INCLUDES := include files...
LOCAL_SHARED_LIBRARIES :=libjpeg M2Cre
LOCAL_PRELINK_MODULE := false
LOCAL_MODULE:= Mbrick
include $(BUILD_SHARED_LIBRARY)

-- 
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: 

3. How to avoid screen become block when change locale

4. Wakeup alarm logging

5. Need help for scrolling interface

6. sms uri

7. OnStop and OnDestroy aren`t invoked after calling finish()