I'm trying to connect to an informix db. This is the script $sqlText='SELECT * FROM dtvc_volum' $ConnectString="Provider=IFXOLEDBC.2;Password=xxxxx;User ID=xxxxx;Data Source=digition@ol_montsia; Persist Security Info=true" $da=New-Object System.Data.OleDb.OleDbConnection $ds=New-Object System.Data.DataSet $conn=New-Object System.Data.OleDb.OleDbConnection($connectString) $conn.Open() $cmd=New-Object System.Data.OleDb.OleDbCommand($sqlText,$conn) $cmd.CommandType='Text' $da.selectCommand=$cmd $ret=$da.fill($ds) $ds.Tables[0] $conn.close() but it shows me this error "the ifxoledbc.2 provider is not registered on the local machine" With vbscipt i can connect to informix with no problem in the Can you help me? Thank you
db connection string to informix
Forum rules
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
- jramon.r@tv3.cat
- Posts: 25
- Last visit: Tue Jan 11, 2022 4:23 am
db connection string to informix
Re: db connection string to informix
Install the Informix client software and the OLEDB drivers for Informix.
In VBScript you may be using the ODBC drivers or a native connection. Without an example we cannot really tell.
Another classic issue is running 64 bit PowerShell or Net Applications and only having the 32 bit drivers installed. Be sure you are running in the correct context for your drivers.
To browse the drivers use the following method:
1 create a file named test.udl on the desktop by creating a new text file and renaming it.
2 Double-click file to open. If all ADO components are installed correctly the connection wizard will open. Look at the provider list. Do you see Informix listed.
In VBScript you may be using the ODBC drivers or a native connection. Without an example we cannot really tell.
Another classic issue is running 64 bit PowerShell or Net Applications and only having the 32 bit drivers installed. Be sure you are running in the correct context for your drivers.
To browse the drivers use the following method:
1 create a file named test.udl on the desktop by creating a new text file and renaming it.
2 Double-click file to open. If all ADO components are installed correctly the connection wizard will open. Look at the provider list. Do you see Informix listed.
- jramon.r@tv3.cat
- Posts: 25
- Last visit: Tue Jan 11, 2022 4:23 am
Re: db connection string to informix
Thanks,
Now it's ok. The problem was the 32 bits driver installed
Now it's ok. The problem was the 32 bits driver installed