Re: Deploy .NET driver Winform app problems
Posted in 2007
Topics: Installation, Setup & Upgrades, Connectivity: ODBC / JDBC / .NET
To my knowledge the 2.90 Informix .NET provider sits on top of the ODBC layer, i.e. when you open a .NET database connection a dynamic ODBC connection is created. You don't need to create an ODBC connection on the file server but you do need to have the Informix CSDK or CONNECT installed on it. The reason is that the .NET DLL uses libraries that are supplied by the CSDK or CONNECT install. You will also need to configure the database server that your trying to connect to in setnet32. (I'm pretty sure this is your problem). DL ----- Original Message ---- From: "srussell705@gmail.com" <srussell705@gmail.com> To: informix-list@iiug.org Sent: Thursday, July 5, 2007 1:48:29 PM Subject: Re: Deploy .NET driver Winform app problems On Jul 5, 1:31 pm, Sheshnarayan Agrawal <shagra...@in.ibm.com> wrote: > >>System.Data.Odbc.OdbcConnection.Open() > > You seem to be using ODBC and not .NET Provider. You got to use > IfxConnection/IfxCommand etc object to use .NET Provider. > > -Shesh Thanks for the reply. This is the function in the Data Tier of my app: Public Shared Function FillDataSet(ByVal sqlStr As String, ByVal ds As DataSet, ByVal tn As String, ByVal AppName As String) As DataSet ' Get a connection string to the darn INFORMIX. ' lower below Dim ConnString As String = FillConnString(AppName) Dim Conn As IfxConnection = New IfxConnection() 'ConnString) Conn.ConnectionString = ConnString Using selectCMD As IfxCommand = New IfxCommand(sqlStr, Conn) selectCMD.CommandTimeout = 30 Using DA As IfxDataAdapter = New IfxDataAdapter DA.SelectCommand = selectCMD Conn.Open() Try DA.Fill(ds, tn) FillDataSet = ds Catch ex As Exception If ds Is Nothing Then Dim dsNull As DataSet = New DataSet FillDataSet = dsNull End If End Try End Using End Using 'End Using Conn.Close() FillDataSet = FillDataSet and: Public Shared Function FillConnString(ByVal Appname As String) As String Dim ConnString As String = "" If AppName = "ChargeIt" Then ConnString = ConfigurationManager.ConnectionStrings("AutoZone.AllData.ChargeIt.My.MySettings.ConnectionString").ConnectionString End If If AppName = "CCBatch" Then ConnString = ConfigurationManager.ConnectionStrings("AutoZone.AllData.CreditCards.My.MySettings.Setting").ConnectionString End If FillConnString = ConnString I have the Imports statement for IBM.Data.Informix as well. So why do I get ODBC references for the driver? _______________________________________________ Informix-list mailing list Informix-list@iiug.org http://www.iiug.org/mailman/listinfo/informix-list
On Jul 5, 2:57 pm, DL Redden <redde...@yahoo.com> wrote: > To my knowledge the 2.90 Informix .NET provider sits on top of the ODBC layer, i.e. when you open a .NET database connection a dynamic ODBC connection is created. You don't need to create an ODBC connection on the file server but you do need to have the Informix CSDK or CONNECT installed on it. The reason is that the .NET DLL uses libraries that are supplied by the CSDK or CONNECT install. You will also need to configure the database server that your trying to connect to in setnet32. (I'm pretty sure this is your problem). > > DL Thanks for the reply. Is the 3.x driver better from an easier deploymnet perspective? If so I'll get it and reinstall an SDK. >From your reply I see lots of hands on work for my sysAdmins, and that won't go over very well. Current users have the 2.5 SDK. I realize that everyone needed an upgrade for the .NET driver :( After that SDK install do we have to create a configuration in the Setnet32.exe? And if so what do I define? I was planning on using a pure DSN-Less environment for these one off business apps that only need 2-3 users. Client wants multiple apps over next month or two. __Stephen