程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 數據庫知識 >> SqlServer數據庫 >> 關於SqlServer >> SQLite for uClinux(一個可以在嵌入式系統中使用的小型數據庫)

SQLite for uClinux(一個可以在嵌入式系統中使用的小型數據庫)

編輯:關於SqlServer
« 嵌入式系統NTLM/NTLMV2身份認證的C語言實現
OpenSSL for uCLinux移植報告 »

SQLite for uCLinux


SQLite  for uCLinux
1. Development Tools Need

hardware: Armsys44b0x development board
software: ucLinux_armsys_051111.tgz , sqlite 2.8.15, sqlite-2.8.13-uc0 patch

2. Steps

2.1 Download

Download SQLite 2.8.15 from SQLite home page
Download sqlite patch for ucLinux sqlite-2.8.13-uc0 patch, no patch for version 2.8.15 found , so we use sqlite-2.8.13-uc0 patch instead and it works well. The URL for the patch is:
http://www.menIE.org/georges/uCLinux/sqlite-2.8.13-uc0.patch.gz

 2.2 Installation
  Extract the sqlite-2.8.15 tarball into your uCLinux-dist/user directory:
   tar -zxvf sqlite-2.8.15.tar.gz
  Change the current working path to sqlite source directory and apply the patch
   zcat sqlite-2.8.13-uc0.patch.gz |patch -p1
  
 2.3  Compliation

  In uCLinux-dist/user/makefile add the sqlite directory in the list of directorIEs to compile:
  dir_y += sqlite    # this is the line to add
  
  compile  and copy the generated sqlite binary to  romfs/bin
  make user_only

 3. Test

# cd /var
# sqlite ex1.db
SQLite version 2.8.12
Enter “.help” for instructions
sqlite> create table tbl1(one varchar(10), two smallint);
sqlite> insert into tbl1 values(’hello!’,10);
sqlite> insert into tbl1 values(’goodbye’, 20);
sqlite> select * from tbl1;
hello!|10
goodbye|20
sqlite> .databases
0           main        /var/ex1.db
1           temp        /var/tmp/s

q
sqlite> .schema
create table tbl1(one varchar(10), two smallint);
sqlite> .exit
#
#  echo “select * from tbl1;”  | sqlite ex1.db
hello!|10
goodbye|20
#

Tags: SQLite, uCLinux

參考了外文資料而成。 
我的blog: www.info-life.cn
本文在我的blog的地址: http://www.info-life.cn/?p=7
  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved