做个标记,在Android中使用网络下载的sqlite文件
先记下来:
FileOutputStream outputStream = openFileOutput("mydb", 0);
InputStream inputStream = response.getEntity().getContent();
byte[] data = new byte[bufferSize];
for (int i = inputStream.read(data); i > 0; i = inputStream
.read(data)) {
outputStream.write(data, 0, i);
}
SQLiteDatabase database = SQLiteDatabase
.openOrCreateDatabase(getFileStreamPath(fileName)
.getAbsolutePath(), null);
Cursor cursor = database.rawQuery("select * from users",
new String[] {});
if (cursor.moveToFirst()) {
Log.i(TAG, "user name: " + cursor.getString(1));
}
database.close();
相关文档:
SQLite Database Browser
SQLite Database browser is a light GUI editor for SQLite databases, built on top of Qt. The main goal of the project is to allow non-technical users to create, modify and edit SQLite databases using a set of wizards and a spreadsheet-like interface.
Downlo ......
2010年SQLite学习笔记之二
一.建立数据库
sqlite3.exe test.db
二.双击sqlite-3_6_16目录下的程序sqlite3.exe,即可运行
三.退出
.exit
或者
.quit
四.SQLite支持如下5种数据类型
1.NULL:空值。
2.INTEGER:带符号的整型,具体取决有存入数字的范围大小。
3.REAL:浮点数字,存储为8-byte IEEE浮点数 ......
我现在使用的是Datalogic 的memor扫描器(intel XScale PXA255@200MHz,系统内存 64M,系统闪存
128M),操作系统为WinCE
5.0,数据库为Sqlite3,在.net环境下面有没有可内将一个20万行数据的txt文件读出并写到Sqlite数据库中?
我现在的做法是:逐行读出文件内容,分割数据后作为参数,用dc.Parameters.add()方法加入SQLiteC ......
from within a C/C++ program (or a script using Tcl/Ruby/Perl/Python
bindings) you can get access to table and index names by doing a SELECT
on a special table named "SQLITE_MASTER
". Every SQLite database has an SQLITE_MASTER table that defines the schema for the database.
SQL code
S ......
本篇文章来源于:开发学院 http://edu.codepub.com 原文链接:http://edu.codepub.com/2009/0825/14358.php
SQLite是个典型的嵌入式DBMS,它有很多优点,它是轻量级的,在编译之后很小,其中一个原因就是在查询优化方面比较简单,它只是运用索引机制来进行优化的,经过对SQLite的查询优化的分析以及对源代码的 ......