我现在有一个PB的程序,使用的是Mysql的数据库。
我现在要打包,谁知道pb如何自动注册mysql的数据源啊?
最好附上源码……
------解决方案--------------------
string ls_local_path
string ls_user_path
string ls_local_path1
string ls_user_path1
string ls_install
string ls_instrans
ls_local_path ="HKEY_LOCAL_MACHINE\Software\ODBC\ODBC.ini\T3.1-UP"
ls_local_path1="HKEY_LOCAL_MACHINE\Software\ODBC\ODBC.ini\T3.1-DOWN"
ls_user_path ="HKEY_CURRENT_USER\Software\ODBC\ODBC.ini\T3.1-UP"
ls_user_path1="HKEY_CURRENT_USER\Software\ODBC\ODBC.ini\T3.1-DOWN"
//ls_local_path2="HKEY_USERS\S-1-5-21-3992001628-2338598895-2917826331-167080\Software\ODBC\ODBC.INI\ODBC Data Sources"
ls_install ="HKEY_CURRENT_MACHINE\Software\ODBC\ODBCINST.INI\Adaptive Server Anywhere 9.0"
ls_instrans ="HKEY_CURRENT_MACHINE\Software\ODBC\ODBCINST.INI\Adaptive Server Anywhere 9.0 Translator"
registryset(ls_install,"CPTimeout",regstring!,"<not pooled>")
registryset(ls_install,"Drivers",regstring!,gs_path+'dbma\dbodbc9.dll')
registryset(ls_install,"Setup",regstring!,gs_path+'dbma\dbodbc9.dll')
registryset(ls_instrans,"Drivers",regstring!,gs_path+'dbma\dbodbc9.dll')
registryset(ls_instrans,"Setup",regstring!,gs_path+'dbma\dbodbc9.dll')
ls_install ="HKEY_CURRENT_MACHINE\Software\ODBC\ODBCINST.INI\ODBC Drivers"
ls_instrans="HKEY_CURRENT_MACHINE\Software\ODBC\ODBCINST.INI\ODBC Translators"
registryset(ls_install,'Adaptive Server Anywhere 9.0',regstring!,'Installed')
registryset(ls_instrans,'Adaptive Server Anywhere 9.0 Translator',regstring!,'Installed')
registryset(ls_local_path,"DataBaseFile",regstring!,gs_path+'\dbma\T3_up.db')
registryset(ls_local_path,"DataBaseName",regstring!,"T3_up")
registryset(ls_local_path,"Driver",regstring!,gs_path+'\dbma\dbodbc9.dll')
registryset(ls_local_path,"EngineName",regstring!,"T3-UP")
registryset(ls_local_path,"PWD",regstring!,"")
registryset(ls_local_path,"Start",regstring!,"")
registryset(ls_local_path,"UID",regstring!,"")
registryset(ls_user_path,"DataBaseFile",regstring!,gs_path+'\dbma\T3_up.db')
registryset(ls_user_path,"DataBaseName",regstring!,"T3_up")
registryset(ls_user_path,"Driver",regstring!,gs_path+'\dbma\dbodbc9.dll')
registryset(ls_user_path,"EngineName",regstring!,"T3-UP")
registryset(ls_user_path,"PWD",regstring!,"")
registryset(ls_user_path,"Start",regstring!,"")
registryset(ls_user_path,"UID",regstring!,"")
registryset(ls_local_path1,"AutoStop",regstring!,"Yes")
registryset(ls_local_path1,"CommLinks",regstring!,"ShareedMemory,TCPID{host=172.19.30.46}")
registryset(ls_local_path1,"Driver",regstring!,gs_path+'\dbma\dbodbc9.dll')
registryset(ls_local_path1,"EngineName",regstring!,"T3-DOWN")
registryset(ls_local_path1,"Compress",regstring!,"No")
registryset(ls_local_path1,"ConnectionName",regstring!,"yzzj")
registryset(ls_local_path1,"Debug",regstring!,"No")
registryset(ls_local_path1,"DisableMultiRowFetch",regstring!,"No")
registryset(ls_local_path1,"Integrated",regstring!,"No")
//
registryset(ls_user_path1,"AutoStop",regstring!,"Yes")
registryset(ls_user_path1,"CommLinks",regstring!,"ShareedMemory,TCPID{host=172.19.30.46}")
registryset(ls_local_path1,"Driver",regstring!,gs_path+'\dbma\dbodbc9.dll')