insert images into axapta- 2009 table from dotnet business connector(c sharp)

Hello All,

I am integrating a dot net application ( c sharp) which creates employee details into Axapta 2009. By using business connector, i am able to insert a employee records in employee table .but i cant insert images(employee photos) in to the employee table. is there is any way to insert images into axapta 2009 table?.

Thanks,

syed irfan.

I would use the same approach as if writing the same in X++. For example, you can load an image file to instance of (X++) class BinData (by loadFile()) and get container value by calling getData(). The value can be directly assigned to container fields.

hi.

Thanks for your valueble replay. can you give me some example codes in c sharp to convert image to Axapta container type. im using " ax.CreateAxaptaRecord(tableName) " method to insert records in to axapata table.

hello Martin,

Thanks for your valueble replay. can you give me some example codes in c sharp to convert image to Axapta container type. im using " ax.CreateAxaptaRecord(tableName) " method to insert records in to axapata table.

Sorry, I don’t have any such code on hand, but you just need to create instance of BinData class and call the two methods I described above. You can find examples of such X++ code in AX (use cross-references), you just have to use BC to call the X++ code (use Axapta.CreateAxaptaObject(), AxaptaObject.Call() - details on MSDN).

Or you can write an X++ method accept image file name, for example, write the converting logic in X++ and call just the single X++ method from BC.

ok. thank you. Mr.Martin.i will try with these two mathods