怎么找 pbl 中连接的数据库连接密码和用户
源代码:string ls_dbms
string ls_database
string ls_logid
string ls_logpass
string ls_servername
string ls_dbparm
string ls_pass
string ls_computername
integer i
integer li_len
string ls_isdbencrypt
string ls_pcid
if registryget("HKEY_LOCAL_MACHINE\Software\Abacus\POS10\Database","DBMS",regstring!,ls_dbms) <> 1 then
messagebox("错误,","尚未设置数据库连接,请检查注册表设置!")
halt close
end if
registryget("HKEY_LOCAL_MACHINE\Software\Abacus\POS10\Database","Database",regstring!,ls_database)
registryget("HKEY_LOCAL_MACHINE\Software\Abacus\POS10\Database","ServerName",regstring!,ls_servername)
registryget("HKEY_LOCAL_MACHINE\Software\Abacus\POS10\Database","logid",regstring!,ls_logid)
registryget("HKEY_LOCAL_MACHINE\Software\Abacus\POS10\Database","logpass",regstring!,ls_logpass)
registryget("HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\ComputerName\ComputerName","ComputerName",regstring!,ls_computername)
registryget("HKEY_LOCAL_MACHINE\Software\Abacus\POS10\Database","IsDBEncrypt",regstring!,ls_isdbencrypt)
if ls_pcid = "" then
registryget("HKEY_LOCAL_MACHINE\Software\Abacus\POS10\Database","stationid",regstring!,ls_pcid)
end if
if ls_pcid <> ls_computername then
ls_pcid = ls_computername
registryset("HKEY_LOCAL_MACHINE\Software\Abacus\POS10\Database","stationid",regstring!,ls_pcid)
end if
if isnull(ls_isdbencrypt) or trim(ls_isdbencrypt) = "" then
ls_isdbencrypt = "n"
end if
if ls_isdbencrypt = "y" then
li_len = len(ls_logpass)
for i = 1 to li_len
if mod(i,2) = 0 then
ls_pass = ls_pass + char(255 - asc(mid(ls_logpass,i,1)))
else
ls_pass = ls_pass + char(256 - asc(mid(ls_logpass,i,1)))
end if
next
else
ls_pass = ls_logpass
end if
if ls_dbms = "ODBC" or ls_dbms = "odbc" then
registryget("HKEY_LOCAL_MACHINE\Software\Abacus\POS10\Database","DBParm",regstring!,ls_dbparm)
atr_in.dbms = "ODBC"
atr_in.autocommit = false
atr_in.dbparm = ls_dbparm
else
atr_in.dbms = ls_dbms
atr_in.database = ls_database
atr_in.servername = ls_servername
atr_in.logid = ls_logid
atr_in.logpass = ls_pass
atr_in.autocommit = false
atr_in.dbparm = "Host = '" + ls_pcid + "'"
end if
connect using atr_in;
if atr_in.sqlcode <> 0 then
messagebox("数据库连接失败!",atr_in.sqlerrtext)
halt close
end if
1.开发人员数据库连接的密码是写在注册表里面吗?
2.访问的注册表是本地的注册表还是数据库的注册表?