|
![]() |
#1 |
Участник
|
DSN настроен на клиенте, код тоже выполняется на клиенте?
попробуйте классический пример: X++: LoginProperty loginProperty; OdbcConnection odbcConnection; ; // Set the information on the ODBC. loginProperty = new LoginProperty(); loginProperty.setDSN("dsnName"); loginProperty.setDatabase("databaseName"); //Create a connection to external database. odbcConnection = new OdbcConnection(loginProperty); Последний раз редактировалось handy-comp; 25.09.2013 в 15:01. |
|
![]() |
#2 |
Участник
|
|
|
![]() |
#3 |
Участник
|
|
|
![]() |
#4 |
Участник
|
Цитата:
Плюс в коде в строке подключения: X++: sConnection = strfmt("MultiSubnetFailover=No;"+ "Trusted_Connection=No;"+ // Аут. SQL "DSN=%1;"+ "Uid=%2;"+ // пользователь "Pwd=%3", // пароль tbl.DSN, tbl.Usr, tbl.Pwd); |
|
![]() |
#5 |
Участник
|
Решил проблему
На АОС-е настроили DSN для 64 и 32 версий (Win. Serv 64 используется)
Класс перевел в серверный. Все заработало. Спасибо всем за ответы. |
|
![]() |
#6 |
Участник
|
Что заработало конечно хорошо, только так и не понял почему если в настройках DSN прямо указано использовать SQL проверку и настроены логи пароль, у вас все равно использовалась Windows аутентификация.
|
|
![]() |
#7 |
Участник
|
|
|
![]() |
#8 |
Модератор
|
Цитата:
Цитата:
Resolution
Problem was escalated to escalation engineers where we confirmed the behavior of the application. In AX 4.0 for the LoginProperty class, we had two properties on this class – setUsername & setPassword – these were the properties you used if you wanted to change the login, see link below… http://msdn.microsoft.com/en-us/libr...(v=ax.10).aspx In AX 2009 onwards, these were removed for security reasons – see link below, they setUsername and setPassword are no longer valid properties. http://msdn.microsoft.com/en-us/libr...(v=ax.50).aspx I have looked at the kernel code, and in AX 4.0 and before if you specified the setUsername and setPassword then the kernel would use these to create the ODBC connection. If they were not specified, then they would use the login for the AX AOS service (or with AX 3.0 or before the client login in two tier mode). So as it is no longer possible to set these properties from AX 2009 onwards, the kernel will always use the login for the AOS service. So even if you try and set these in the “setOther” property on the LoginProperty class, they are ignored as in the connection string we create in the kernel code is always using trusted authentication of the AOS Service account – so these additional properties are ignored.
__________________
-ТСЯ или -ТЬСЯ ? |
|
Теги |
ax2012, odbc, odbcconnection |
|
Опции темы | Поиск в этой теме |
Опции просмотра | |
|