Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

MySQL ODBC Connection Failure

$
0
0

$connection = New-Object System.Data.Odbc.OdbcConnection
$connectionString = "Driver={MySQL ODBC 5.2 ANSI Driver};Server=$server;Uid=$uid;Pwd=$pwd;Database=$db;"
$connection.ConnectionString = $connectionString
$connection.Open()

Gives the error below, I have checked and double checked that the server, db, uid, pwd are correct. I can connect if I use the MySQL .NET drivers (same server, db etc..) and can link to MySQL tables with the ODBC drivers through Access or Excel.  Can't understand it? 

ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not

found and no default driver specified"

 


Viewing all articles
Browse latest Browse all 6937

Trending Articles