We're sorry.My English is very bad.
The code can work generated MDB files. But no password. May I ask how to create MDB file with a password.
Local $DbFileName = @ScriptDir & "\Test.mdb"
Local $UserID = "admin"
Local $PassWord = "Testpwd"
Local $ODBC_ADD_SYS_DSN = 4
Local $lpszDriver = "Microsoft Access Driver (*.MDB)" & Chr(0)
Local $lpszAttributes = "CREATE_DB=" & $DbFileName & " General" & Chr(0) & _
"UID=" & $UserID & Chr(0) & _
"PWD=" & $PassWord & Chr(0)
DllCall("odbccp32.dll","BOOL","SQLConfigDataSource","HWND",NULL, _
"WORD",$ODBC_ADD_SYS_DSN ,"str",$lpszDriver,"str",$lpszAttributes)
The code can work generated MDB files. But no password. May I ask how to create MDB file with a password.
Local $DbFileName = @ScriptDir & "\Test.mdb"
Local $UserID = "admin"
Local $PassWord = "Testpwd"
Local $ODBC_ADD_SYS_DSN = 4
Local $lpszDriver = "Microsoft Access Driver (*.MDB)" & Chr(0)
Local $lpszAttributes = "CREATE_DB=" & $DbFileName & " General" & Chr(0) & _
"UID=" & $UserID & Chr(0) & _
"PWD=" & $PassWord & Chr(0)
DllCall("odbccp32.dll","BOOL","SQLConfigDataSource","HWND",NULL, _
"WORD",$ODBC_ADD_SYS_DSN ,"str",$lpszDriver,"str",$lpszAttributes)