程序的发布

Manan_Liang 2002-03-25 11:39:00
程序的发布到异地的机子上,ODBC中没有驱动程序,
那么数据库驱动程序放在哪个目录?
...全文
80 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
powerbu 2002-03-25
  • 打赏
  • 举报
回复
希望这个贴子能对您有所帮助:
单机版应用中注册ASA7.0数据库的系列问题

在程序中注册OBDC的有些DLL和VSD文件是需要直接COPY到SYSTEM下的,或者C:\下。
//********************************************************************************
//注册ODBC
string ls_servername
RegistryGet("HKEY_CURRENT_USER\software\odbc\odbc.ini\emotor",&
"EngineName",RegString!,ls_servername)

if (isnull(ls_servername) or trim(ls_servername)="") then

RegistrySet("HKEY_CURRENT_USER\software\odbc\odbc.ini\ODBC Data Sources",&
"emotor",RegString!,"Adaptive Server Anywhere 7.0 )")

RegistrySet("HKEY_CURRENT_USER\software\odbc\odbc.ini\emotor",&
"CommLinks",RegString!,"TCPIP{},SharedMemory")

RegistrySet("HKEY_CURRENT_USER\software\odbc\odbc.ini\emotor",&
"Driver",RegString!,"c:\dbodbc7.dll")

RegistrySet("HKEY_CURRENT_USER\software\odbc\odbc.ini\emotor",&
"EngineName",RegString!,"server")
end if

//********************************************************************************
szKey="Software\\Microsoft\\Windows\\CurrentVersion\\Run";
szDbrun=TARGETDIR^'\\dbeng\\dbsrv7.exe'+ ' -c 8m -x tcpip -n server -gp 8192 -p 8192 '+ szDir +'\\database\\emotordb.db';
szDbname="dbsrv7";
if StrCompare(nResult_setuptype ,"typical")!=0 then
nResult = RegDBSetKeyValueEx(szKey,szDbname, nType,szDbrun,120) ;
if (nResult < 0) then
MessageBox("注册表更新失败,请重新安装",WARNING);
//goto end_install;
endif;
//********************************************************************************







//******不安装ASA7.0数据库管理系统的单机版应用所需的ASA7.0文件列表:************

Wod50t.dll
Wl50ent.dll
Odbcint.dll
Odbccp32.dll
Odbc32.dll
Dbsrv7.exe
Dbserv7.dll (这个文件可能必须拷贝到WINDOWS \ SYSTEM目录下)
Dbodbc7.dll (这个文件可能必须拷贝到WINDOWS \ SYSTEM目录下)
Dblgen7.dll (这个文件可能必须拷贝到WINDOWS \ SYSTEM目录下)
Dbl50to.dll
Dbl50t.dll
Dbeng7.exe
Dbctrs7.dll
Dbcon7.dll
Dbmem.vxd (这个文件可能必须拷贝到WINDOWS \ SYSTEM目录下)
//***********************pb程序所需相关dll***********************************
pbdwe70.dll
pbodb70.dll
pbvm70.dll
libjcc.dll


//***********************INSTALLSHIELD中的处理**********************************
//保证DLL文件的安装路径正确,INSTALLSHIELD中的COPY
nResult_setuptype = "";
tmpdir = TARGETDIR;
TARGETDIR="c:\\";
CopyFile("DBODBC7.DLL","DBODBC7.DLL");
CopyFile("DBLGEN7.DLL","DBLGEN7.DLL");
CopyFile("DBSERV7.DLL","DBSERV7.DLL");
TARGETDIR = WINSYSDIR ;
CopyFile("Dbmem.vxd","Dbmem.vxd");
nResult1 = CopyFile("_inst.dl_","check.dll");

//如果你要启动WINDOWS数据库自动运行,就要在INSTALLSHIELD下写入
szKey="Software\\Microsoft\\Windows\\CurrentVersion\\Run";
szDbrun=TARGETDIR^'\\dbeng\\dbsrv7.exe'+ ' -c 8m -x tcpip -n server -gp 8192 -p 8192 '+ szDir +'\\database\\emotordb.db';
szDbname="dbsrv7";
if StrCompare(nResult_setuptype ,"typical")!=0 then
nResult = RegDBSetKeyValueEx(szKey,szDbname, nType,szDbrun,120) ;
if (nResult < 0) then
MessageBox("注册表更新失败,请重新安装",WARNING);
//goto end_install;
endif;
其中 dbeng\\dbsrv7.exe和database\\emotordb.db可以放在你的程序目录下
如#---软件
------dbeng
-------Wod50t.dll
Wl50ent.dll
Odbcint.dll
Odbccp32.dll
Odbc32.dll
Dbsrv7.exe
Dbserv7.dll
Dbodbc7.dll
Dblgen7.dll
Dbl50to.dll
Dbl50t.dll
Dbeng7.exe
Dbctrs7.dll
Dbcon7.dll

------database
-------emotordb.db

RegDBSetKeyValueEx(svDB,"AutoStop",REGDB_STRING,"YES",-1);
中的SVDB要设置好
我这里是:
HKEY_CURRENT_USER\Software\ODBC\ODBC.INI\server

401

社区成员

发帖
与我相关
我的任务
社区描述
PowerBuilder 非技术版
社区管理员
  • 非技术版社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧