当前位置:数据库 > SQLite >>

Sqlite 可以在VB中使用的封装

答案:封装了如下API: 
.DLL命令 sqlite3_open, 整数型, "dllsqlite.dll", "sqlite3_open"
    .参数 filename, 文本型
    .参数 Handle, 整数型, 传址

.DLL命令 sqlite3_close, 整数型, "dllsqlite.dll", "sqlite3_close"
    .参数 Handle, 整数型

.DLL命令 sqlite3_exec, 整数型, "dllsqlite.dll", "sqlite3_exec"
    .参数 Handle, 整数型
    .参数 SQL, 文本型
    .参数 CallBack, 整数型
    .参数 other, 整数型
    .参数 错误代码, 整数型, 传址

.DLL命令 GetProcAddress, 整数型, "dllsqlite.dll", "MyGetProcAddress", '这是我在封装Sqlite加进去得一个函数。。。原因 VB不支持指针。
    .参数 函数, 子程序指针

.DLL命令 sqlite3_last_insert_rowid, 长整数型, "dllsqlite.dll", "sqlite3_last_insert_rowid"
    .参数 Handle, 整数型

.DLL命令 sqlite3_get_table, 整数型, "dllsqlite.dll", "sqlite3_get_table"
    .参数 sqlite3, 整数型
    .参数 SQL, 文本型
    .参数 resultp, 整数型, 传址
    .参数 row, 整数型, 传址, '记录数
    .参数 col, 整数型, 传址, '列数
    .参数 错误代码, 整数型, 传址, '出错才用。

.DLL命令 sqlite3_free_table, 整数型, "dllsqlite.dll", "sqlite3_free_table"
    .参数 Handle, 整数型

.DLL命令 MyGetData, 文本型, "dllsqlite.dll", "MyGetDataA", '这是我编写得一个dll功能是读取表中得数据,原因,VB不支持指针。
    .参数 指针, 整数型
    .参数 记录, 整数型
    .参数 列, 整数型
    .参数 列总数, 整数型

.DLL命令 GetVersion, 整数型, "dllsqlite.dll", "MyGetVersion" ‘自己编写得。

///////////////////////////////////以上API都已经经过严格测试,
另外还封装了:---没有测试。
const void *sqlite3_column_blob(sqlite3_stmt*, int iCol);
int sqlite3_column_bytes(sqlite3_stmt*, int iCol);
int sqlite3_column_bytes16(sqlite3_stmt*, int iCol);
double sqlite3_column_double(sqlite3_stmt*, int iCol);
int sqlite3_column_int(sqlite3_stmt*, int iCol);
long long int sqlite3_column_int64(sqlite3_stmt*, int iCol);
const unsigned char *sqlite3_column_text(sqlite3_stmt*, int iCol);
const void *sqlite3_column_text16(sqlite3_stmt*, int iCol);
int sqlite3_column_type(sqlite3_stmt*, int iCol);

sqlite_vb.rar (142737bytes)

上一个:创建连接数据库SQLite 3.x的Rails网络应用软件
下一个:利用PHP的SQLite扩展开发能力

Oracle
MySQL
Access
SQLServer
DB2
Excel
SQLite
SYBASE
Postgres
如果你遇到数据库难题:
请访问www.zzzyk.com 试试
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,