03.05.2008, 08:16 | #1 |
Участник
|
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! 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! Источник: http://axdevnotes.blogspot.com/2008/...parameter.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору. |
|
|
|