Code to Insert Image in Table using axapta x++


 Image img;  
 Filename name;  
 str type;  
 #File  
 ;  
 img = new Image();  
 type = '.'+strlwr(enum2value(img.saveType()));  
 name = WinAPI::getOpenFileName(element.hWnd(), [WinAPI::fileType(type),#AllFilesName+type], '', '');  
 if (name)  
 {  
 ttsbegin;  
 img.loadImage(name);  
 ImageTable.Image = img.getData();  
 ImageTable.write();  
 ttscommit;  
 }