I am trying to figure out how to connect to an IBM informix database. I have been doing some research and have found some threads from 5 years ago but those examples are not working.
I have installed the latest SDK from IBM for informix.
I have included the IBM.Data.Informix.dll to my references in my project.
I have included the using IBM.Data.Informix;
I am just adding a button and on click testing the conenction. I always get this debug error "SQL0035N The file "C:\Users\Adam\documents\visual studio 2010\Projects\test\test\msg\en_US\db2nmp.xml" cannot be opened."
This file does not exist and I dont see it anywhere in the Program Files (x86)\IBM Informix Client SDK directory.
My On click code is
private void button1_Click(object sender, EventArgs e)
{
const string HOST = "192.168.OBFUSCATED";
const string SERVICENUM = "1525"; //Port?
const string SERVER = "serverOBFUSCATED";
const string DATABASE = "dbOBFUSCATEDy";
const string USER = "myusername";
const string PASSWORD = "mypassword";
string ConnectionString = "Host=" + HOST + "; " +
"Service=" + SERVICENUM + "; " +
"Server=" + SERVER + "; " +
"Database=" + DATABASE + "; " +
"User Id=" + USER + "; " +
"Password=" + PASSWORD + "; ";
IfxConnection conn = new IfxConnection();
conn.ConnectionString = ConnectionString;
try
{
conn.Open();
MessageBox.Show("Made connection!");
}
catch (IfxException ex)
{
MessageBox.Show("Problem with connection attempt: " + ex.Message);
}
}
Anyone know what I am doing wrong or the current best way to connect to informix database?
Thanks in advance.