cancel
Showing results for 
Search instead for 
Did you mean: 

How to Retrieve the image stored in sql server and display in web dynpro

susmita_panigrahi
Active Participant
0 Kudos

Hi All,

I am using a bean class called UserInfoBean.In that class i am trying to retrieve all information of a User by giving Employee_Id.After creating the jar file of bean class ,i am importing this jar file into my Web dynpro application called MyProfile.In the Bean class i have taken a variable named image of type byte[].And in the model manually i have created a context variable named image of type bynary.

My question is how to dispaly the image of a user and photo path of a user's image on web dynpro view where i am displaying user's profile information after retrieving data from the sql server .Is there any code sample that i have to mention inside the onActionSearch() method of view?Inside this method i am calling Bean class's method where i am retrieving the data from back end.

Another problem i am facinng in the property field of Image UI element when ever i am trying to map the alt and source property of Image ui element to model's context variable image of type binary.Its showing error "Select an attribute of type String".

If i am not taking image variable as byte[] in the bean class then how i will store the image in that variable after retrieving image column from sql server?Is there any another option?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Susmita,

Check this too /people/anilkumar.vippagunta2/blog/2007/02/20/reading-and-writing-images-from-sqlserver-in-webdynpro

Regards,ANilkumar

Answers (2)

Answers (2)

susmita_panigrahi
Active Participant
0 Kudos

Hi Anil

This is very helpful answer.I will follow these steps.

Thanks

Susmita

BeGanz
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hallo Susmita,

NW04: see

Regards, Bertram