hi
i want to save a image in database without using the file uploader how to do this .the image is in a folder named images.and the column PICTURE HAS DATATYPE AS IMAGE.
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Pankaj PandeyPosted Jul 2, 2013, 5:33 AM
if yes then read the all image name with help of Directory() and in a loop read all files one by one and store the images in to your databse.
Sunny SharmaPosted Jul 2, 2013, 1:56 AM
if you're using ASP.NET application to save the image in database, then you are required to have some kind of File Upload Mechanism like you have FileUpload Control or you're free to use third party jQuery file uploaders. Since you cannot upload file using AJAX, they use inbuilt iframe to make a HTTP POST to the defined URI.
Otherwise if you want to save image directly in database using SSMS or some other DBMS, use this syntax:
INSERT INTO myTable VALUES('D:\\myImage.jpg');
This will insert an image to your table.
Hope you got the point.
Happy Coding :)
Cheers!