Install An ODBC connection from cmd line

后端 未结 2 1779
长情又很酷
长情又很酷 2021-01-14 08:17

Install An ODBC connection from cmd line

Hi, i want to install an odbc connection threw the cmd line, in this cmd below i can open
only a name

2条回答
  •  清酒与你
    2021-01-14 09:06

    According to this article on Microsoft.com:

    ODBCCONF.exe will be removed in a future version of Windows Data Access Components. Avoid using this feature, and plan to modify applications that currently use this feature. You can use PowerShell commands to manage drivers and data sources. For more information about these PowerShell commands, see Windows Data Access Components cmdlets.

    The Power Shell equivalent to your command would be:

    Add-OdbcDsn -Name "test" -DriverName "MySQL ODBC 5.2w Driver" -Platform "32-bit" -DsnType "System" -SetPropertyValue @("SERVER=127.0.0.1", "PORT=3306", "DATABASE=mdb")
    

提交回复
热议问题