winCE中如何使用sqlite3

现在想在winCE中使用sqlite数据库,已经在vs2008中建立了MFC智能设备应用程序,不知道接下来该怎么做才能才该工程中使用sqlite数据库,写sql语句,让开发环境能识别sql语句?
谢谢!

http://www.docin.com/p-632122826.html

这个是开源的,你去找个例子,加入sqliter库就可以了。

你需要去下载 sqliter的库,添加到工程里,很小的
这是一个sqlite 例子也可 以看下;
import sqlite3

connect to memory-only database for testing

con = sqlite3.connect('')
cur = con.cursor()

create the table

cur.execute('''
CREATE TABLE CorpWalletJournal (
date INT, refID INT, refTypeID INT, ownerName1 TEXT,
ownerID1 INT, ownerName2 TEXT, ownerID2 INT, argName1 TEXT,
argID1 ID, amount INT, balance INT, reason TEXT, accountKey INT,
UNIQUE (ownerID1, ownerID2, accountKey, argID1)
);
''')
con.commit()

insert_sql = '''INSERT INTO CorpWalletJournal
(date, refID, refTypeID, ownerName1, ownerID1, ownerName2, ownerID2,
argName1, argID1, amount, balance, reason, accountKey)
VALUES
(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'''

create 5 rows changing only argID1 - it works:

for argid in xrange(5):
cur.execute(insert_sql, (1, 1, 1, 'a', 1, 'a', 1, 'a', argid, 1, 1, 'a', 1))
con.commit()

now try to insert a row that is already there:

cur.execute(insert_sql, (1, 1, 1, 'a', 1, 'a', 1, 'a', 0, 1, 1, 'a', 1))