|
我现在想做一个查询语句的操作..
代码如下:
#include "lrd.h"
static LRD_INIT_INFO InitInfo = {LRD_INIT_INFO_EYECAT};
static LRD_DEFAULT_DB_VERSION DBTypeVersion[] =
{
{LRD_DBTYPE_NONE, LRD_DBVERSION_NONE}
};
vuser_init()
{
}
--------------------------------------------------
//定义各种变量
static void FAR * OraEnv1;
static void FAR * OraSvc1;
static void FAR * OraSrv1;
static void FAR * OraSes1;
static void FAR * OraStm1;
Action()
{
unsigned long rownum;
//初始化数据库参数
lrd_init(&InitInfo, DBTypeVersion);
lrd_initialize_db(LRD_DBTYPE_ORACLE, 3, 0);
lrd_env_init(LRD_DBTYPE_ORACLE, &OraEnv1, 0, 0);
lrd_ora8_handle_alloc(OraEnv1, SVCCTX, &OraSvc1, 0);
lrd_ora8_handle_alloc(OraEnv1, SERVER, &OraSrv1, 0);
lrd_ora8_handle_alloc(OraEnv1, SESSION, &OraSes1, 0);
//设定联接数据库地址
lrd_server_attach(OraSrv1, "DBTEST_59.151.27.83", -1, 0, 0);
lrd_ora8_attr_set_from_handle(OraSvc1, SERVER, OraSrv1, 0, 0);
//设定连接数据库的用户名和密码
lrd_ora8_attr_set(OraSes1, USERNAME, "dtuser_hall", -1, 0);
lrd_ora8_attr_set(OraSes1, PASSWORD, "NOPASS", -1, 0);
//初始化session
lrd_ora8_attr_set_from_handle(OraSvc1, SESSION, OraSes1, 0, 0);
//开始连接数据库
lrd_session_begin(OraSvc1, OraSes1, 1, 0, 0);
lrd_ora8_handle_alloc(OraEnv1, STMT, &OraStm1, 0);
/*-------------设定查询条件-----------------*/
lrd_ora8_stmt(OraStm1, "select * from dt_clientuser", 1, 0, 0);
//执行查询语句
lrd_ora8_exec(OraSvc1, OraStm1, 0, 0,&rownum, 0, 0, 0, 0, 1);
lr_error_message("%d",rownum);
//删除数据库连接信息
lrd_handle_free(&OraStm1, 0);
lrd_session_end(OraSvc1, OraSes1, 0, 0);
lrd_server_detach(OraSrv1, 0, 0);
lrd_handle_free(&OraEnv1, 0);
}
---------------------------------------------------
但是为什么? 我一运行就有这个错误呢?
Action.c(13): lrd.c/fjInitDB: Cannot load the ORACLE library (DLL), "ora805.dll", specified after a "+" in the "805" entry in section [ORACLE_WINNT] in the "lrd.ini" file. - 找不到指定的模块。
Processing continues
说什么dll 找不到指定的模块..
3.我用的是LR 9.0,数据库用的是 oracle 数据库.
[ 本帖最后由 superfang 于 2008-5-26 14:33 编辑 ] |
|