-
大小: 1.49MB文件类型: .zip金币: 2下载: 5 次发布日期: 2021-04-07
- 语言: VB
- 标签: sqlite vb litex_sqlite
资源简介
sqlite支持vb6的版本,使用该版本后就能用vb6.0操作sqlite数据库了,速度比较快,使用前先注册
代码片段和文件信息
/*
** 2004 October 31
**
** The author disclaims copyright to this source code. In place of
** a legal notice here is a blessing:
**
** May you do good and not evil.
** May you find forgiveness for yourself and forgive others.
** May you share freely never taking more than you give.
**
*************************************************************************
** This file contains the C functions that implement blob
** functions for SQLite.
**
** There is only one exported symbol in this file - the function
** sqlite3_register_blob_functions() found at the bottom of the file.
** All other code has file scope.
**
*/
#include
#include
#include
#include
#include
#include “blobfn.h“
#ifdef _UNICODE
#define BLOB_CP SQLITE_UTF16LE
#else
#define BLOB_CP SQLITE_UTF8
#endif
static int get_first_param(
sqlite3_context *context
int argc
sqlite3_value **argv
int* pnSize
const char** ppBlob )
{
if ( (argc > 0) &&
(sqlite3_value_type(argv[0]) == SQLITE_BLOB ) )
{
*pnSize = sqlite3_value_bytes( argv[0] );
*ppBlob = (const char*)sqlite3_value_blob( argv[0] );
return 1;
}
else
{
return 0;
}
}
static TCHAR get_second_param(
sqlite3_context *context
int argc
sqlite3_value **argv
TCHAR cDef )
{
if ( (argc > 1) &&
(sqlite3_value_bytes(argv[1])>0) &&
(sqlite3_value_type(argv[1]) == SQLITE_TEXT ) )
{
#ifdef _UNICODE
return *( (const WCHAR*)sqlite3_value_text16le(argv[1]) );
#else
return *sqlite3_value_text(argv[1]);
#endif
}
else
{
return cDef;
}
}
/*
** tovis
*/
static void tovisFunc(
sqlite3_context *context
int argc
sqlite3_value **argv )
{
int nSize i;
const char* pBlob;
PTSTR pszRes;
TCHAR cRep;
char c;
if ( !get_first_param( context argc argv &nSize &pBlob ) )
{
return;
}
cRep = get_second_param( context argc argv _T(‘\0‘) );
if ( !_istprint(cRep) ) cRep = _T(‘.‘); // default value
pszRes = malloc( nSize * sizeof(TCHAR) );
if ( !pszRes )
{
return;
}
for( i=0; i {
c = pBlob[i];
pszRes[i] = isprint(c)? c : cRep;
}
#ifdef _UNICODE
sqlite3_result_text16le(context pszRes nSize * sizeof(WCHAR) SQLITE_TRANSIENT);
#else
sqlite3_result_text(context pszRes nSize SQLITE_TRANSIENT);
#endif
free(pszRes);
}
static const TCHAR HEXDIG[] = _T(“0123456789ABCDEF“);
/*
** tohex
*/
static void tohexFunc(
sqlite3_context *context
int argc
sqlite3_value **argv )
{
int nSize i j;
const char* pBlob;
PTSTR pszRes;
TCHAR cSep;
char c;
int nAddSep;
if ( !get_first_param( context argc argv &nSize属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2006-04-23 18:40 Doc\
文件 1854 2006-04-23 18:39 Doc\ado_dot_net.html
文件 38519 2006-05-12 23:25 Doc\automation.html
文件 1633 2006-04-27 22:35 Doc\index.html
文件 66143 2006-05-12 23:22 Doc\pp.html
目录 0 2006-02-18 12:37 Inc\
文件 57 2006-04-23 17:40 Inc\Readme.txt
目录 0 2006-02-18 12:37 Lib\
目录 0 2006-04-23 18:59 LibDll\
文件 15268 2006-04-23 17:18 LibDll\sqlite3.exp
文件 25196 2006-04-23 17:18 LibDll\sqlite3.lib
文件 15268 2006-04-23 11:30 LibDll\sqlite3d.exp
文件 25306 2006-04-23 11:30 LibDll\sqlite3d.lib
文件 15274 2006-04-23 11:46 LibDll\sqlite3du.exp
文件 25424 2006-04-23 11:46 LibDll\sqlite3du.lib
文件 15272 2006-04-23 17:18 LibDll\sqlite3u.exp
文件 25306 2006-04-23 17:18 LibDll\sqlite3u.lib
目录 0 2006-04-23 17:41 litex\
目录 0 2006-05-14 21:40 litex\bin\
文件 26 2004-08-16 21:07 litex\bin\reg_litex.bat
文件 216064 2006-05-14 21:33 litex\bin\sqlite3.dll
文件 216576 2006-05-14 21:34 litex\bin\sqlite3u.dll
文件 29 2004-08-16 21:07 litex\bin\ureg_litex.bat
文件 4612 2004-11-03 22:17 litex\blobfn.c
文件 242 2004-09-28 18:30 litex\blobfn.h
文件 4764 2006-05-14 21:32 litex\Changelog.txt
文件 5535 2006-04-27 21:25 litex\Connection.cpp
文件 2292 2006-04-27 21:22 litex\Connection.h
文件 831 2004-11-10 17:11 litex\dlldata.c
文件 1161 2004-08-08 08:29 litex\dlldatax.c
文件 754 2004-08-08 08:29 litex\dlldatax.h
............此处省略127个文件信息
相关资源
- EXCEL vba 批量复制粘贴至指定位置脚本
- 可倒计时自动关机vbs脚本
- 定时关机 VBS脚本源代码 可以使用
- 牛人纯VB打造的经典游戏超级玛丽
- VB6.0:雷塞运动控制(总线卡)控制
- Excel自动计算熵权法指标权重-VBA代码
- RTL8153B-VB-CG官方参考原理图-V1.4.rar45
- 非常好用免费的DICOM源程序包附vb de
- VB免控件实现HTTP请求
- 哈工大学生用VB写的ABC财务管理软件
-
vb
sc ript安装程序 - VBS代码大全
-
vb
sc ript中文参考手册.chm - GEOCOM32-VB徕卡全站仪开发包
- 文件管理系统(VB6.0源代码)文件管理
- 保存到数据库程序(VB6.0源代码编写)
- 宿舍管理 (VB+SQL)
- VB源码VB Access存储图片与读取示例
- VB编写的矩阵运算系统
- 完整图书管理系统VB
- vb 对图片的柔化效果
- vbAdvance V3.1.1.5 最终版 Key(免费注册
- vb16进制与ASCII码转换
- vb常用长度单位换算器
- 程序介绍了vb使用MSCHART实现曲线的源
- LISP调用VB写的DLL教程
- 自写VB超好用缩略图
- ExcelVBA辅助录入v2.2.2(交通工程质量监
- 平抛运动的VB源代码
- vb.net 透明窗体 窗口透明但控件不透明
川公网安备 51152502000135号
评论
共有 条评论