自動註冊Access ODBC

2021-03-31 08:57:00 字數 1794 閱讀 2357

if not fileexists(filename) then

messagebox("資訊",'資料來源註冊或修改失敗,請正確填寫檔名!')

return -1

end if

if not fileexists(getsystemroot()+"system32/odbcjt32.dll") then

filecopy(cdirect+"/mytool/odbcjt32.dll",getsystemroot()+"system32/odbcjt32.dll",true)

end if

driverfile=getsystemroot()+"system32/odbcjt32.dll"

if flag=0 then

//新建資料來源

registryset("hkey_current_user/software/odbc/odbc.ini/"+odb**ame,"dbq",regstring!,filename)

registryset("hkey_current_user/software/odbc/odbc.ini/"+odb**ame,"driver",regstring!,driverfile)

registryset("hkey_current_user/software/odbc/odbc.ini/"+odb**ame,"driverid",regulong!,25)

registryset("hkey_current_user/software/odbc/odbc.ini/"+odb**ame,"fil",regstring!,"ms access;")

registryset("hkey_current_user/software/odbc/odbc.ini/"+odb**ame,"safetransactions",regulong!,0)

registryset("hkey_current_user/software/odbc/odbc.ini/"+odb**ame,"uid",regstring!,"")

registryset("hkey_current_user/software/odbc/odbc.ini/"+odb**ame+"/engines/jet","implicit***mitsync",regstring!,"")

registryset("hkey_current_user/software/odbc/odbc.ini/"+odb**ame+"/engines/jet","maxbuffersize",regulong!,2048)

registryset("hkey_current_user/software/odbc/odbc.ini/"+odb**ame+"/engines/jet","pagetimeout",regulong!,5)

registryset("hkey_current_user/software/odbc/odbc.ini/"+odb**ame+"/engines/jet","user***mitsync",regstring!,'yes')

else

registryset("hkey_current_user/software/odbc/odbc.ini/"+odb**ame,"dbq",regstring!,filename)

end if

registryset("hkey_current_user/software/odbc/odbc.ini/odbc data sources",odb**ame,regstring!,"microsoft access driver (*.mdb)")

當然,如果資料庫有使用者名稱和密碼就需要你再寫倆鍵值了。類推的。asa庫的註冊也是一樣的。網上也有很多。不再祥敘。

zabbixagent自動註冊

1.zabbix agent.conf配置檔案加上 serveractive zabbxserverip hostmetadataitem system.uname 註釋hostname屬性 示例 2.zabbix web端配置自動註冊 1 動作 自動註冊 建立動作 2 要注意的是在新增條件的時候,...

Ninject 自動註冊

首先這個問題我糾結了很久,看到autofac強大的自動註冊功能,我感覺ninject弱爆了,不過ninject自帶屬性註冊,感覺很方便,所以還在糾結ninject 傳統的繫結方式 public class bllmodule ninjectmodule 一個介面對應一個實體類,太費勁了。自動繫結方式...

Zabbix 自動發現 自動註冊

zabbix 為使用者提供了高效靈活的網路自動發現功能,有以下優點 ip 範圍 可用的外部服務 ftp ssh web pop3 imap tcp 等 來自 zabbix 客戶端的資訊 僅支援未加密模式 來自 snmp 客戶端的資訊 不支援 發現網路拓撲 網路發現由兩個階段組成 發現和動作 原理 z...

Zabbix Agent自動註冊(三)

一 zabbix server配置。ip 192.168.1.199 在 二 中以配置完成 1.建立host group configuration host groups選單右上測create host group按鈕。建立agent auto register。新增模版。2.新增自動操作規則 c...

五 Zabbix 自動註冊

一 zabbix serber 1.進入動作介面 配置 動作 事件源 自動註冊 建立動作 2.配置自動註冊動作 1.配置動作 2.配置操作 新增成功後,zabbix server顯示動作 二 調整zabbix agent配置檔案 1.更改zabbix agent配置 cd etc zabbix cp...