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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 03.05.2008, 08:16   #1  
Blog bot is offline
Blog bot
Участник
 
25,459 / 846 (79) +++++++
Регистрация: 28.10.2006
Developer notes: Null value for ADO command parameter
Источник: http://axdevnotes.blogspot.com/2008/...parameter.html
==============

Now I whith my colleagues work on integration Axapta with the other business application named M&F (Management and Finance). Our company uses M&F for more than eight years and now it is time for new ERP system. This application has 2-tier architecture, and its business logic is on the server side. We use stored procedure API for document exchange from Axapta to M&F. Some days ago I tried to call stored procedure on MS SQL Server from X++. For several parameters it was necessary to set null value. At first I instantiated COMVariant like this:
X++:
COM parameter = new COM("ADODB.Parameter");
COMVariant nullParam = new COMVarian(ComVariantInOut::In, ComVariantType::VT_NULL);
;
parameter.name("@paramName");
parameter.type(#adInteger);
parameter.value(nullParam); // This method throw exception!
After several hours research I found decision of this problem:

X++:
COM parameter = new COM("ADODB.Parameter");
nullParam = new COMVariant();
;
parameter.name("@paramName");
parameter.type(#adInteger);
nullParam.variantType(ComVariantType::VT_NULL);
parameter.value(nullParam); // This method doesn`t throw exception now!
I think problem is in constructor of the COMVariant class. What is your opinion?


Источник: http://axdevnotes.blogspot.com/2008/...parameter.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
Developer notes: Inventory closing make corrections for transactions in closed periods Blog bot DAX Blogs 2 15.07.2008 20:52
Developer notes: Be careful whith Collections and Maps in Axapta Blog bot DAX Blogs 0 13.05.2008 19:05
Developer notes: Write InfoLog to database Blog bot DAX Blogs 0 03.05.2008 08:16
Developer notes: Why debit and credit turnovers different in Ledger and Inventory modules? Blog bot DAX Blogs 0 03.05.2008 08:16
Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск
Опции просмотра

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

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

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 20:15.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.