Sage 50 v25 Ошибка ODBC - драйвер вернул недопустимый (или не смог вернуть) SQL_DRIVER_ODBC_VER: 25.0 - PullRequest
1 голос
/ 20 марта 2019

Я пытаюсь получить Hashtable из Sage 50, содержащий данные о валюте, используя следующий код:

_hshCurrencies = new System.Collections.Hashtable();
Data.Sage50.Sage50DataSetTableAdapters.CURRENCYTableAdapter _CurrencyTableAdapter = new Data.Sage50.Sage50DataSetTableAdapters.CURRENCYTableAdapter();
Data.Sage50.Sage50DataSet.CURRENCYDataTable _Currencies = _CurrencyTableAdapter.GetData();

Я получаю следующее сообщение об ошибке:

ERROR [28000] User ID or Password invalid  ERROR [01000] The driver returned invalid (or failed to return) SQL_DRIVER_ODBC_VER: 25.0  
ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed  
ERROR [01000] [Microsoft][ODBC Driver Manager] The driver doesn't support the version of ODBC behavior that the application requested (see SQLSetEnvAttr).     
                    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.OdbcConnectionOpen..ctor(OdbcConnection outerConnection, OdbcConnectionString connectionOptions)     
                    at System.Data.Odbc.OdbcConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject)     
                    at System.Data.ProviderBase.DbConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)     
                    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 oldConnection, DbConnectionInternal& connection)     
                    at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)     
                    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 System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)     
                    at System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior)     
                    at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable)     
                    at AL.Data.Sage50.Sage50DataSetTableAdapters.CURRENCYTableAdapter.GetData() in C:\Projects\AL\AL\AL\Data\Sage50\Sage50DataSet.Designer.cs:line 7531     
                    at AL.Controllers.Sage50SynchronisationController.InitialiseAccountsConnection() in C:\Projects\AL\AL\AL\Controllers\Sage50SynchronisationController.cs:line 94

1 Ответ

0 голосов
/ 20 марта 2019

Возможно, вы пропустили пароль в строке подключения (или он неверен) - в более ранних версиях Sage 50 это не требовалось, но сейчас это необходимо.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...