Provider=MSDASQL;Driver={MySQL ODBC 5.2 UNICODE Driver};Server=localhost;Port=3306;Database=fixedasset_kl;User=root;Password=password;Option=3
Above is my connection string. And, I have configured and add driver to System DNS, named Report and driver is Unicode driver
Is there any other configuration I need to do to make it work? I installed the 32bit ODBC connector now.
It runs when I use in debug mode, but when I run it in IIS server using localhost:8000. It doesn't generate report.
Below is error message I got.
-System.Data.Odbc.OdbcException (0x80131937): 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, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionInternal.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.Odbc.OdbcConnection.Open()
at FA.xx.Report.xxx.xx(Nullable`1 FromDate, Nullable`1 ToDate, String TreeLst) in C:\xx\x\x\xxx\xx\xx\xx\xx\xx.cs:line 77
Thanks