Skip to Content
0
Former Member
Mar 27, 2008 at 09:58 PM

Reading from the Table after blog, urgent

7 Views

Hi, Im following this blog https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/5892. [original link is broken]

I sucessfully implemented first part to my project there is a problem with second part, from comments I see that not only I do.

the code is:

try{
			
  Connection con=new SAPDBConnection().getConnection();
  Statement  st=con.createStatement();
  ResultSet rs = st.executeQuery("SELECT  * FROM SDN_USERS");
  while(rs.next())
  {
	String name=rs.getString( 1);
	byte[] b=rs.getBytes(2);
	IWDResource res=WDResourceFactory.createCachedResource(b,"MyImage",WDWebResourceType.JPG_IMAGE);
  IPrivateGeneratorView .IImageTableElement imageEle=wdContext.createImageTableElement();
  imageEle .setName( name);
 imageEle.setImage( res.getUrl(WDFileDownloadBehaviour.OPEN_INPLACE.ordinal()));
			wdContext.nodeImageTable() .addElement(imageEle );
}
	
	}
	catch(Exception e){
		wdComponentAPI.getMessageManager().reportWarning(e.toString());
	}

and I get:

The method setImage(IWDResource) in the type IPrivateMyProjectView.IImageTableElement is not applicable for the arguments (String).

Is there any solution to this? Regards, Balmer