Ok.
I looked the Informix Client 2.9 SDK, I found and installed in my computer. Now in the Visual Web Developer, add the reference Ibm.Data.Informix.dll for use the functions IfxConnection, IfxCommand.... but when I compiled my website, appear this message:
The type initializer for 'IBM.Data.Informix.IfxConnection' threw an exception.
This message appear in the line:
IfxConnection ocon = new IfxConnection(infcon)
Look my code and you tell me, Where is the error?
//------------------------------------------------------------------------------------------------------------------
using IBM.Data.Informix
...
...
...
string infcon = "Dsn='pautas2';Driver={INFORMIX ODBC DRIVER};Host=gensa;Server=gensa;Service=sqlturbo;Protocol=olsoctcp;Database=pautas;UID=informix;PWD=rrah2000";
IfxConnection ocon = new IfxConnection(infcon);
try
{
ocon.Open();
this.lbl1.Text = "Se conecto";
}
catch
{
this.lbl1.Text = "Fallo la conexion";
}
ocon.Close();
I'm programing in Visual C# 2005 with Visual Web Developer 2005 Express.
Help me, please.
Thanks