Wednesday, October 3, 2007

uploading and downloding the image in oracle database using asp.net

Contents are from the following link :-

http://www.geekinterview.com/question_details/28239

First way is store image in BYTEARRAY while checking UPLOAD CONTROL and hold that image in CACHE. And then store it (bytearray) in Database while clicking SAVE button.

2. Another way is to PUT that image on server by using UPLOAD.FileSave("PATH OF FILE") in an Binary array. The file will be saved in a folder on the server in JPG or any other form. And while saving it, image will have to be transfer from BinaryArray to Database. However if you do not want to make your database heavy becuase of the image, let it be stored on the server folder - just save the path of that file in the Database, which can be extracted while runtime of the application


3. To upload the image in to the Oracle: if you are using stored procedure then by using command instance object you and pass the image in Binary Format is Request.BinaryRead() and to display the image user the same method i.e. reponse.binarwrite()

No comments: