Click here to Skip to main content
15,920,631 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i placed a button to search a id . when i entered id no ,based on that id number we have to get the information from database i.e image to display from that id
Posted

1 solution

I guess this means you have no idea about how databases work. The language used by databases is called SQL. You can call SQL from VB via what's called a stored procedure ( essentially a 'program' that you call by name in your DB ), or by straight SQL code. You would write code like

select image from images where id = @id

and then either use a paramaterised query or a stored proc to insert the value for id.
 
Share this answer
 
Comments
amperayani 2-Aug-12 4:02am    
i know how to display selected image in image control
from database
amperayani 2-Aug-12 4:02am    
i know but i want how to display selected image in image control
from database
Christian Graus 2-Aug-12 4:07am    
Then your question was vague to the point of being meaningless. OK, then you want to write a http handler or just an ASPX that takes the id on the URL, then returns the bytes of the image with the correct mime type. Then you make the source URL of your image control point to that page, such as loadimage.aspx?id=57, and the browser will send the request and return the image. This is widely documented on the web, if you try to search, you'll find tons of examples.

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