autoit如何调用hsql
我想打开一个hsql的数据库得到里面的内容,请问如何打开,对数据库操作一无所知啊 在线等,有人知道吗 回复 2# sbtddh没用过Hsql
但我想原理应该都差不多:
我贴一下连MYsql的样式等你参考一下:Func _MySQLConnect($sUsername, $sPassword, $sDatabase, $sServer, $sDriver = "{MySQL ODBC 5.2w Driver}", $iPort=3306)
Local $v = StringMid($sDriver, 2, StringLen($sDriver) - 2)
Local $key = "HKLM\SOFTWARE\ODBC\ODBCINST.INI\ODBC Drivers", $val = RegRead($key, $v)
If @error or $val = "" Then
SetError(2)
TrayTip ("Message","连接失败,没有找到驱动",30)
Sleep(1000)
Return 0
EndIf
$ObjConn = ObjCreate("ADODB.Connection")
$Objconn.open ("DRIVER=" & $sDriver & ";SERVER=" & $sServer & ";DATABASE=" & $sDatabase & ";UID=" & $sUsername & ";PWD=" & $sPassword & ";PORT="&$iPort)
If @error Then
SetError(1)
TrayTip ("Message","连接失败",30)
Sleep(1000)
Return 0
Else
TrayTip ("Message","连接成功",30)
Sleep(1000)
Return $ObjConn
EndIf
EndFunc ;==>_MySQLConnect
页:
[1]