易截截图软件、单文件、免安装、纯绿色、仅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.


相关文档:

android 的sqlite 主键与simpleCursorAdapter

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

Sqlite在C#中的应用

在 .NET 里面使用 SQLite, 我这里使用的wrapper是 System.Data.SQLite,它只需要一个dll,接口符合ADO.Net 2.0的定义,性能也不错,NHibernate用的也是它,目前支持ADO.NET 3.5了,支持集成在 VS2005 和 VS2008里面,而且支持wince,是个亮点
因为符合ADO.NET的规范,所以使用方式,基本和 SqlClient, OleDb等原生的一致
us ......

web.py+sqlite写的简单留言本

代码很乱,而且没有用到模板,把html代码跟Python代码混在一起了,而且也没有用到web.py本身提供的数据库操作模块,绝对粗超的代码!
学习了很多东西,首先当然是web.py,然后是sqlite,接下来是time模块——看来也唯有不断的实践,才真正能进步!
说实在的,偶学html到现在这么久,还是半桶水,悲剧了!
01&n ......

总结SQLite不支持的SQL语法有哪些


1 TOP
这是一个大家经常问到的问题,例如在SQLSERVER中可以使用如下语句来取得记录集中的前十条记录:
SELECT TOP 10 * from [index] ORDER BY indexid DESC;
 
但是这条SQL语句在SQLite中是无法执行的,应该改为:
SELECT * from [index] ORDER BY indexid DESC limit 0,10;
 
其中limit 0,10表示从第0 ......

Android SQLITE 简单起步

1:定义表的结构和名字,我使用以下方法:
public interface Constatnts extends BaseColumns {
   public static final String TABLE_NAME = "test";
  
   public static final String TIME = "time";
   public static final String TITLE = "title";
}
在这里,我继承 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号