This question have been inactivated and are not visible on this site.

Connecting to Informix from Powershell

I am trying to connect to an Informix database from powershell 4

I can connect to ms sql easily

$table=(Invoke-Sqlcmd -ServerInstance $server -Username $login -Password $password -Database $database -Query $query)

however I am finding it much more difficult to connect to a odbc datasource. In this case I am trying to build a connection to an Informix database with a odbc connection string. it is objecting to Provider as a value.

$conn = New-Object System.Data.SqlClient.SqlConnection
$conn.ConnectionString = "Provider=Ifxoledbc;Data Source=@;User ID=;Password=0;Persist Security Info=true;"

Anyone have a working example of tying to an Informix database and running a sql statement?

0 answers