I try to connect to informix server 11.5 using using IBM.Data.Informix (located in C:\Program Files\IBM\IBM DATA SERVER DRIVER\bin\netf20_32\IBM.Data.Informix.dll). I’m using vb2008 and when I try to connect throws an error invalid argument.
Where is the problem? Thanks
public static IfxConnection MAkeConnInformix()
{
IfxConnection cnn = new IfxConnection();
string error = "";
try
{
string ConnectionString = Database=mydbname;Host=10.8.8.50;Server=mainserver_net;Service=1526; Protocol=onsoctcp;UID=myuser;Password=mypass";
cnn.ConnectionString = ConnectionString;
}
catch (Exception ex)
{
error = ex.Message;
}
return cnn;
}
If you cannot connect because something is wrong with locale then add properties to your connect string. I do not use .net, but in JDBC such Informix connect string with Polish locale info looks like:
In Listing 1 on http://www.ibm.com/developerworks/data/library/techarticle/dm-0510durity/ there is example that says that DB_LOCALE and others can be add to .net connet string/