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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 22.12.2010, 08:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,644 / 848 (80) +++++++
Регистрация: 28.10.2006
Naresh: Read and Alter registry settings in Axapta
Источник: http://colorsofaxapta.spaces.live.co...172E!117.entry
==============


Read and alter registry settings in Axapta

Here is a sample code of increasing max. open cursors during run-time. But, please note that its purpose is only to show you how to read and write registry. If you encounter any open cursors problem, it is recommended to optimize the SQL statement rather than changing the setting for maximum open cursors. 
static void IncreaseMaxOpenCursors(Args _args)
{
    #winapi

    container   regRet;   
    int         readReg;
    int         writeReg;
    str         keyValue, keyPath, configName;
    int         maxOpenCursors;
    ;

 
    //Specify your Axapta configuration utility name here
    configName = "LocalMachine";
    //New maximum open cursor, default is 90
    maxOpenCursors = 120;
    keyPath = @"SOFTWARE\Navision\Axapta\3.0\" + configName;

<div style="font-family:Verdana"><font color="#333399" size="2">    readReg  = WinAPI::regOpenKey( #HKEY_CURRENT_USER, keyPath, #KEY_READ);
    if (readReg)
    {
        regRet = WinAPI::regGetValue(readReg, 'opencursors');
        keyValue = conpeek(regRet,1);
        info(keyValue);
        if (str2int(keyValue) <font color="#0000ff">
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
Microsoft Dynamics CRM Team Blog: Organizing Settings Navigation in CRM 4.0 Blog bot Dynamics CRM: Blogs 0 29.01.2009 02:20
Fred Shen: Read and alter registry settings in Axapta Blog bot DAX Blogs 0 28.10.2006 16:40

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

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

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