×ö¸ö±ê¼Ç£¬ÔÚ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();
Ïà¹ØÎĵµ£º
1) ÈçºÎ´´½¨×ÔÔö×ֶΣ¿
¼òµ¥µÄ»Ø´ð£ºÒ»¸öÉùÃ÷Ϊ INTEGER PRIMARY KEY µÄ×ֶν«×Ô¶¯Ôö¼Ó¡£
ÕâÀïÊÇÏêϸµÄ´ð°¸£º ´Ó SQLite µÄ 2.3.4 °æ±¾¿ªÊ¼£¬Èç¹ûÄ㽫һ¸ö±íÖеÄÒ»¸ö×Ö¶ÎÉùÃ÷Ϊ INTEGER PRIMARY
KEY£¬ÄÇôÎÞÂÛÄãºÎʱÏò¸Ã±íµÄ¸Ã×ֶβåÈëÒ»¸ö NULL Öµ£¬Õâ¸ö NULL Öµ½«×Ô¶¯±»¸ü»»Îª±È±íÖиÃ×Ö¶ÎËùÓÐÐеÄ×î´óÖµ´ó
......
/*=================================
.* The Standard include file.
.*
.*===============================*/
#include <stdio.h>
#include <stdlib.h>
/*=================================
.*
.* The extend include file.
.*
.*===============================*/
#include "sqlit ......
ÔÎÄÁ´½Ó£ºhttp://edu.codepub.com/2008/1231/805.php
windowsÏÂsqlite°²×°Ê¹ÓúÍÐÔÄÜÓÅ»¯¼°ÉèÖÃ
sqliteÊÇǶÈëʽSQLÊý¾Ý¿âÒýÇæSQLite£¨SQLite Embeddable SQL Database Engine£©µÄÒ»¸öÀ©Õ¹¡£SQLiteÊÇÒ»¸öʵÏÖǶÈëʽSQLÊý¾Ý¿âÒýÇæСÐÍCÓïÑԿ⣨C library£©£¬ÊµÏÖÁ˶ÀÁ¢µÄ£¬¿ÉǶÈëµÄ£¬ÁãÅäÖ ......
SQLiteÓô¥·¢Æ÷À´Ìæ´úÍâ¼üÔ¼Êø CREATE TABLE [Category] (
[Pkid] INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
[CategoryName] NVARCHAR(32) NOT NULL,
[CategoryGuid] char(36) UNIQUE NOT NULL,
[CategoryDesc] nvarchar(256) NULL
) C ......
ÎÒÀÏÆŹ¤×÷Òª¹ÜÀíºÃ¶àµÄexcel±í¸ñ±È½ÏµÄÂé·³£¬ÓÚÊÇÏë×Å°ïæд¸öÈí¼þÈÃËý·½±ãµã
ÆäʵÎÒwinformÈí¼þ»¹Ã»ÓÐд¹ýÄØ£¬ÒÔǰдµÄ¶¼ÊÇwebµÄ
ÒòΪдµÄÈí¼þ¾ÍÊÇËý×Ô¼ºÓÃÓÃÎÒÏëÓ¦¸Ã²»ÐèÒªÓÃʲô´óµÄÊý¾Ý¿âµÄ£¬ËùÒÔÎÒ×îÏÈÏëµ½ÓÃaccessÊý¾Ý¿âͦ·½±ãµÄÎļþ¸´ÖƾͿÉÒÔÁË
¿ÉÊÇÎÒûÓÐoffice access°¡£¬²»¹ýÎҼǵõçÄÔÉϺÃÏñÓÐaccessÊý¾Ý¿â ......