How Do i retrieve images from sql database using a 3 tier application with stored procedures

Posted by MediaMan under Regular Expressions on 9/3/2009 | Views : 5703 | Status : [Member] | Replies : 9
I am a beginner who is trying to desing a gallery application using sqlserver 2005 and asp.net 3.5 and i can only upload images.......how can I retrieve them without using 1 tier...please help me iam desperately trying to finish my small project a sample of my code is attached




Responses

Posted by: Vuyiswamb on: 9/3/2009 [Member] [MVP] [Administrator] NotApplicable

Up
0
Down
Good Day MediaMan

Where is the DataSource of your Image ?

Are they from the Database or from a Folder somewhere in your Application?


Thank you for posting at Dotnetfunda
[Administrator]

MediaMan, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: MediaMan on: 9/3/2009 [Member] Starter

Up
0
Down
Thank you once again Vuyiswa .....They are from my database

MediaMan, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vuyiswamb on: 9/3/2009 [Member] [MVP] [Administrator] NotApplicable

Up
0
Down
Good Morning

i always keep my images in a certain Directory in my web app. i dont store them in a database. I think i see the perfomance hit i will get if i can try to do that. but in your case here is how its done

http://www.beansoftware.com/asp.net-tutorials/images-database.aspx


http://aspalliance.com/141


http://www.aspfree.com/c/a/ASP.NET/Retrieving-Images-from-a-Database--C---Part-II/


http://www.dotnetcurry.com/ShowArticle.aspx?ID=129


Thank you for Posting at Dotnetfunda

Vuyiswa Maseko


Thank you for posting at Dotnetfunda
[Administrator]

MediaMan, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Rtpharry on: 9/4/2009 [Member] [MVP] Bronze

Up
0
Down
I have just answered this same kind of question elsewhere in these forums so here is a repost of my answer:

Hey,

It would be a better design if you put this image data on the filesystem and then simply store the url in the database. It would reduce the strain on the database.

However if you are already tied to this architecture then you can use the following control which was introduced .net 3.5:

http://www.codedigest.com/Articles/ASPNET/119_New_Image_Generator_control_in_ASPNet_35.aspx

MediaMan, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: MediaMan on: 9/4/2009 [Member] Starter

Up
0
Down
Vuyiswa i think you might have a point there ......i think i should use that one .....Please help on that one rather .....Thank You

MediaMan, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: MediaMan on: 9/4/2009 [Member] Starter

Up
0
Down
Thank you very much ......

MediaMan, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vuyiswamb on: 9/4/2009 [Member] [MVP] [Administrator] NotApplicable

Up
0
Down
ok let me Prepare a Sample and Post it here

Thank you for posting at Dotnetfunda
[Administrator]

MediaMan, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: MediaMan on: 9/5/2009 [Member] Starter

Up
0
Down
Thank you.....looking foward to seeing how i'ts actually done

MediaMan, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vuyiswamb on: 9/6/2009 [Member] [MVP] [Administrator] NotApplicable

Up
0
Down
This is the simplest example.


http://www.logiclabz.com/javascript/create-a-modal-window-div-element-with-javascript-on-html.aspx

http://ashishware.com/ASPValid.shtml



http://www.codeproject.com/KB/aspnet/Masked_Div_Or_Modal_Popup.aspx



Thank you for posting at Dotnetfunda

Vuyiswa Maseko

Thank you for posting at Dotnetfunda
[Administrator]

MediaMan, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response