This project is read-only.

invoke-sql: Cannot process argument transformation?

Mar 23, 2015 at 7:34 PM
I am just starting to use this module, and I am doing something that appears to be quite simple, but I am getting an error.
$mySQLConn = New-MySQLConnection -server $MySQLHost -user $MySQLAdminUserName -password $MySQLAdminPassword -database $MySQLDatabase 
$mySQLcmd = Invoke-SQL -sql $sqlstmt -connection $mySQLConn
Then I get this error:
Invoke-Sql : Cannot process argument transformation on parameter 'connection'. Cannot convert the
"MySql.Data.MySqlClient.MySqlConnection" value of type "MySql.Data.MySqlClient.MySqlConnection" to type
Any suggestions?
Mar 24, 2015 at 1:17 AM
You accidentally used invoke-sql (out of the adolib module) instead of one of the invoke-MySQL functions.

it's either invoke-mysql, invoke-mysqlquery depending on whether the sql statement has a result set.

Mar 25, 2015 at 5:19 PM
Ugh! Thanks for pointing that out!