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
edit delete
are you sure?
asked nichols greg

0 answers

Post an answer but please log in first

Post Answer
  1. Please log in to post answer

Similar Questions

Tagsfor this question

Forumall questions