易截截图软件、单文件、免安装、纯绿色、仅160KB

Using SQLite from Shell in Android

Where is SQLite?
SQLite is available on the Android device itself. The executable is in the /system/bin directory of the device. You can see that this directory contains the shell commands like ls, ps, etc., as well as sqlite3, dalvikvm, and dexdump utilities.
Code Listing 1. Contents of system/bin
# pwd
pwd
/system/bin
# ls -l
ls -l
-rwxr-xr-x root root 196 2008-02-29 01:09 am
-rwxr-xr-x root root 2342 2008-02-29 01:09 dumpstate
-rwxr-xr-x root root 208 2008-02-29 01:09 input
-rwxr-xr-x root root 212 2008-02-29 01:09 monkey
-rwxr-xr-x root root 196 2008-02-29 01:09 pm

lrwxr-xr-x root root 2008-02-29 01:16 mount -> toolbox
lrwxr-xr-x root root 2008-02-29 01:16 notify -> toolbox
-rwxr-xr-x root root 28032 2008-02-29 01:16 dexdump
-rwxr-xr-x root root 7100 2008-02-29 01:16 dumpsys
-rwxr-xr-x root root 7904 2008-02-29 01:16 mem_profiler
-rwxr-xr-x root root 6480 2008-02-29 01:16 service
-rwxr-xr-x root root 4320 2008-02-29 01:16 rild
-rwxr-xr-x root root 4928 2008-02-29 01:16 sdutil
-rwxr-xr-x root root 26488 2008-02-29 01:16 sqlite3
-rwxr-xr-x root root 4148 2008-02-29 01:16 dexopt
-rwxr-xr-x root root 4908 2008-02-29 01:16 dalvikvm
-rwsr-sr-x root root 3200 2008-02-29 01:16 surfaceflinger
-rwxr-xr-x root root 5420 2008-02-29 01:16 app_process
-rwxr-xr-x root root 39408 2008-02-29 01:16 runtime
-rwxr-xr-x root root 2920 2008-02-29 01:16 system_server
-rwxr-xr-x root root 9168 2008-02-29 01:17 pv
Where are the SQLite databases on an Android Device?
By default, the SQLite databases have an extension .db. For example, a NotePad application may use note_pad.db database. This might be created from code using Android SDK’s SQLite classes/methods. By default, the SQLite database for an application is in the /data/data/<app>/databases directory. As you can see from the listing below, the notepad database is in the /data/data/com.google.android.notepad/databases directory.
Code Listing 2.


相关文档:

QT读写Sqlite数据库 FurtherChan

QT读写Sqlite数据库
//.h
/****************************************************************************
**
** Date    : 2010-05-08
** Author  : furtherchan
** If you have any questions , please contact me
**
****************************************************************** ......

SQLite语法 CREATE TRIGGER


时间:
2009-08-14 21:18:18来源:
网络 作者:

知 点击:
214

CREATE TRIGGER
    
        
            sql-statement ::=
       ......

android 的sqlite 主键与simpleCursorAdapter

android 的sqlite 主键与simpleCursorAdapter
最近在在做一个小例子时,出现一个小问题,就是不能显示从数据库中查出的数据,后来在网上查了一查,才知道原来是这个问题。 
 在使用simpleCursorAdapter显示sqlite数据时,必须注意sqlite的主键命名。由于simpleCursorAdapter的方法只识别_id,所以,当你用到sql ......

SQLite 初体验

1. 下载最新版 SQLite (sqlite-3_6_23_1), copy到C:\下.
2. 新建数据库:
C:\>sqlite3.exe "d:\testdb.db"
3.进入了sqlite3之后,会看到以下文字:
SQLite version 3.1.3
Enter ".help" for instructions
sqlite>
4.建一个名叫film的数据库表
create table film(title, length, year, starring);
5.插入记录 ......

sqlite加密设计的缺陷与改进


sqlite是
一个非常小巧的跨平台嵌入式数据库,它本身不提供加密功能,不过设计者明显也考虑了加密的方案,我们在源码中可以找到两个预留的加密接
口:sqlite3_key和sqlite3_rekey,可以通过实现这两个接口来达到加密的目的。
        如何加密,已经有很多文章描述,可以参考:《
......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号