Deploy .NET driver Winform app problems
Posted in 2007
Topics: Installation, Setup & Upgrades, Connectivity: ODBC / JDBC / .NET
I have a 2.9 SDK installed on my dev box. I have a simple form exe that does a load of data in form_load. I have the same SDK installed on my test user workstation. I publish an online only deployment to a file server. From that FS, my install starts, the app then errors in the FillDataSet() function. Here is the JIT message up to my last piece of code: ************** Exception Text ************** System.Data.Odbc.OdbcException: ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified at System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, RetCode retcode) at System.Data.Odbc.OdbcConnectionHandle..ctor(OdbcConnection connection, OdbcConnectionString constr, OdbcEnvironmentHandle environmentHandle) at System.Data.Odbc.OdbcConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject) at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) at System.Data.Odbc.OdbcConnection.Open() at MyCompany.DAL.DataPortal.FillDataSet(String sqlStr, DataSet ds, String tn, String AppName) Why is there all this reference to ODBC if I am using the IBM Informix .NET driver? Do I need to have a DSN on each workstation? <really don't want to do that at all> Any ideas? TIA __Stephen
>>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 srussell705@gmail.com Sent by: informix-list-bounces@iiug.org 05/07/2007 23:46 To informix-list@iiug.org cc Subject Deploy .NET driver Winform app problems I have a 2.9 SDK installed on my dev box. I have a simple form exe that does a load of data in form_load. I have the same SDK installed on my test user workstation. I publish an online only deployment to a file server. From that FS, my install starts, the app then errors in the FillDataSet() function. Here is the JIT message up to my last piece of code: ************** Exception Text ************** System.Data.Odbc.OdbcException: ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified at System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, RetCode retcode) at System.Data.Odbc.OdbcConnectionHandle..ctor(OdbcConnection connection, OdbcConnectionString constr, OdbcEnvironmentHandle environmentHandle) at System.Data.Odbc.OdbcConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject) at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) at System.Data.Odbc.OdbcConnection.Open() at MyCompany.DAL.DataPortal.FillDataSet(String sqlStr, DataSet ds, String tn, String AppName) Why is there all this reference to ODBC if I am using the IBM Informix .NET driver? Do I need to have a DSN on each workstation? <really don't want to do that at all> Any ideas? TIA __Stephen _______________________________________________ Informix-list mailing list Informix-list@iiug.org http://www.iiug.org/mailman/listinfo/informix-list
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?