Null is not interpreted. If you specify "Null" the interop layer will use
"Null" as parameter value and that is not always a valid parameter value.



If you specify System.Type.Missing the interop layer will call the method
with a correct default parameter value based on the type library.





You can try the following



Call the logon2 method as follows



Object missingType = System.Type.Missing;

axapta2.Logon2(missingType, missingType,missingType,

               missingType, missingType, missingType,

               missingType,missingType,missingType,missingType);



this will use the default configuration for logon.





and then try doing this.



axapta2.Logon2(null,null,null,null,null,null,null,null,null,null);



Calling logon2 with null's as paramter will fail with an "Invalid argument"
exception.



This is because "Null" is not a valid paramter value for several of the
parameters in the "Logon2" method.



br



Lars



  _____ 

From: [email protected]
[mailto:[EMAIL PROTECTED] On Behalf Of Andreas
Rudischhauser
Sent: Wednesday, January 18, 2006 12:31 AM
To: [email protected]
Subject: AW: [development-axapta] Re: Axapta ComConnector



What's the problem with null? How is that interpreted?



________________________________

Von: [email protected]
[mailto:[EMAIL PROTECTED] Im Auftrag von Lars
Mikkelsen
Gesendet: Mittwoch, 18. Januar 2006 03:43
An: [email protected]
Betreff: RE: [development-axapta] Re: Axapta ComConnector



When doing com interop with C# and you want to omit an optional
parameter
you should always use the C# special type System.Type.Missing



In this case you should change your statement to



Object missingType = System.Type.Missing;

AxaptaQuery = axapta.CreateObject("query", missingType, missingType,
missingType, missingType, missingType, missingType);



The advantage of doing this is that the com interop layer automatically
specifies the missing parameters for you.



This is the same as in VB.NET where you can write



AxaptaQuery = axapta.CreateObject("query")



Br



Lars





  _____ 

From: [email protected]
[mailto:[EMAIL PROTECTED] On Behalf Of Martin
Sujkowski
Sent: Monday, January 16, 2006 12:03 PM
To: [email protected]
Subject: [development-axapta] Re: Axapta ComConnector



Which line in your c sharp code produces the error?
For starters i would replace all the empty string arguments you're
using in your axapta calls with null arguments like this:

change:
AxaptaQuery = axapta.CreateObject("Query","","","","","","");

TO:

AxaptaQuery = axapta.CreateObject
("Query",null,null,null,null,null,null);


--- In [email protected], "Andreas Rudischhauser"
<[EMAIL PROTECTED]> wrote:
>
> I want to create an .Net application that needs to fetch all the
> records in the emplTable.
>

>

>
> Add one field with no value
>

>
> Further the application will have to
> delete all records in a "work table". My first question is how do
I
> delete records from an Axapta table?
>

>
> Use ExecuteStatement or something for sql ... or use the Dictionary
> Methods from AOT like this
>

>
> IAxaptaObject axDictionary =
> this.AxNetMapper.Axapta.CreateObject
("Dictionary",null,null,null,null,nu
> ll,null);
>
> object o =
> axDictionary.Call("tableObject",this.Id,null,null,null,null,null);
>
>                   if (o != null)
>
>                   {
>
>                         IAxaptaObject axTable = (IAxaptaObject)o;
>
>                         return axTable;
>
>                   }
>
>                   else
>
>                   {
>
>                         throw new Exception("Die Tabelle " +
this.Name +
> " konnte nicht geladen werden");
>
>                   }
>

>
>
>
> My second question is why I get the following error when the
> application exits:
>
> "Runtime error!"
> program: "....AXCOM\AXCOM.vshost.exe
> R6025
> - Pure Virtual Function call
>
>
>
>
>
>
>
>
>
> ________________________________
>
> YAHOO! GROUPS LINKS
>

>
> *      Visit your group "development-axapta
> <http://groups.yahoo.com/group/development-axapta> " on the web.
>        
> *      To unsubscribe from this group, send an email to:
>       [EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]
subject=Unsubscri
> be>
>        
> *      Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> Service <http://docs.yahoo.com/info/terms/> .
>

>
> ________________________________
>
>
>
> [Non-text portions of this message have been removed]
>









  _____ 

YAHOO! GROUPS LINKS



*      Visit your group "development-axapta
<http://groups.yahoo.com/group/development-axapta> " on the web.
 
*      To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]
be>
 
*      Your use of Yahoo! Groups is subject to the Yahoo!
<http://docs.yahoo.com/info/terms/>  Terms of Service.



  _____ 



[Non-text portions of this message have been removed]






________________________________

YAHOO! GROUPS LINKS



*      Visit your group "development-axapta
<http://groups.yahoo.com/group/development-axapta> " on the web.
       
*      To unsubscribe from this group, send an email to:
      [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]
be>
       
*      Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service <http://docs.yahoo.com/info/terms/> .



________________________________



[Non-text portions of this message have been removed]






SPONSORED LINKS


Computer
<http://groups.yahoo.com/gads?t=ms&k=Computer+part&w1=Computer+part&w2=Progr
amming+languages&w3=Microsoft+axapta&w4=Support+exchange&c=4&s=90&.sig=yLpvc
LTIDJ5FTkRJGsO11w>  part

Programming
<http://groups.yahoo.com/gads?t=ms&k=Programming+languages&w1=Computer+part&
w2=Programming+languages&w3=Microsoft+axapta&w4=Support+exchange&c=4&s=90&.s
ig=cuhEClK4dU4wapXFmKisbQ>  languages

Microsoft
<http://groups.yahoo.com/gads?t=ms&k=Microsoft+axapta&w1=Computer+part&w2=Pr
ogramming+languages&w3=Microsoft+axapta&w4=Support+exchange&c=4&s=90&.sig=yf
eG_U6QaLfPOZZIud02Fg>  axapta


Support
<http://groups.yahoo.com/gads?t=ms&k=Support+exchange&w1=Computer+part&w2=Pr
ogramming+languages&w3=Microsoft+axapta&w4=Support+exchange&c=4&s=90&.sig=hy
8yRGMzrmxdphyITTUeqA>  exchange







  _____ 

YAHOO! GROUPS LINKS



*      Visit your group "development-axapta
<http://groups.yahoo.com/group/development-axapta> " on the web.
 
*      To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>
 
*      Your use of Yahoo! Groups is subject to the Yahoo!
<http://docs.yahoo.com/info/terms/>  Terms of Service.



  _____ 



[Non-text portions of this message have been removed]





SPONSORED LINKS
Computer part Programming languages Microsoft axapta
Support exchange


YAHOO! GROUPS LINKS




Reply via email to