Click here to Skip to main content
15,894,405 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi All,

My task is to dispaly the images in dataset.
Images and their text name are stored in database.
i need to dispaly the textname and image names.

Ex:-

Dataset:-

Folwer Nature Baby //Image Text Name

flow.jpg Na.jpg Baby.jpg //Images.

Can any one send me the sample code for this.


Thanks in Advance
Posted
Updated 19-Dec-11 19:30pm
v3
Comments
Suresh Suthar 20-Dec-11 1:20am    
If this is your task than do it your self. What is the problem?
What have you tried? Any code?

Dear Friend,

A picture stored in database can't be kept or inserted into a dataset column as the image is a stream object which can be only read if the connection is open and dataset works into a disconnected mode.

You have to use sql datareader object in order to read image from the database :-) as it maintains a connection with the db till the time whole content is not read from the database.


I hope this will help you out.

Thanks
 
Share this answer
 
Comments
RagSuchi 20-Dec-11 1:32am    
Hi Varun,

Thanks for your reply,

Can you send me the sample code for this.
RaviRanjanKr 20-Dec-11 3:41am    
No one will send you Sample Code. you need to put your effort and then revert back with specific question.
Varun Sareen 20-Dec-11 5:13am    
Dear RagSuchi, I would have provided you the code but when i was not able to show the image after retrieving the byte image from the sql reader object so i turned my self to storing images in folder and that worked. If you need that i can provide you :-). Also if you search for the code it can be easily available to you. Thanks Varun Sareen
 
Share this answer
 
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900