AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 28.10.2006, 16:40   #1  
Blog bot is offline
Blog bot
Участник
 
25,626 / 848 (80) +++++++
Регистрация: 28.10.2006
Dynamics AX: Returning the Current SQL Server, Database, and Configuration
Источник: http://dynamics-ax.blogspot.com/2006...-database.html
==============
Recently I needed to add business logic around code, that acted differently based on what Ax instance I was in. I wanted to know the best way to always determine that, and after doing some searching I cam across the following line of code:

SqlSystem::databaseBackendDesc();

The above line of code will return in string value the: [Server Name] [Database Name]

This is not documented really anywhere, and the SqlSystem class is not something that can even be seen from the AOT itself. It's one of those hidden, but very useful classes that we have all had to deal with, or wish we knew more about. Anyway, this method works great and returns the correct information everytime!

Another method that is great comes from the xInfo class, and it looks like this:

xInfo::configuration();

This method will return the name of the current configuration in use, which in turn can also help you determine which instance of Ax you are using.

I know that I will have use for this in the future and so I have posted this little tidbit in hopes that it will helps others as well!

Find a job at: www.DynamicsAXJobs.com


==============
Источник: http://dynamics-ax.blogspot.com/2006...-database.html
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
Arijit Basu: Integrating MOSS 2007 and Dynamics AX Part I - setting up your development environment Blog bot DAX Blogs 1 14.01.2008 11:40
Inside Dynamics AX 4.0: The Security Framework Blog bot DAX Blogs 0 31.10.2007 11:40
Inside Dynamics AX 4.0: Licensing and Configuration Blog bot DAX Blogs 0 31.10.2007 11:40
axaptabuilder: Notes about my experience in setup of Microsoft Dynamics AX 4.0 integrated with Microsoft Visual Source Safe. Blog bot DAX Blogs 0 27.06.2007 09:30
axaptabuilder: Notes about my experience in setup of Microsoft Dynamics AX 4.0 integrated with Microsoft Visual Source Safe. Blog bot DAX Blogs 0 28.10.2006 16:47

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 02:15.