View Full Version : How to insert image in sql server?
abcjfk
01-18-2007, 06:45 PM
I am trying to insert images into a sql server database? I make the data type as image already but i dont know how to insert the image into the database? Any help will be great
Terminator1138
01-19-2007, 06:36 AM
Well, most just like to store it in a folder on the server and retrieve but here you go anyways. I'm guessing also that you need this for an online application.
I'm guessing you already have the table set up?
Similar to this perhaps?
CREATE TABLE binary_data (
id INT(4) NOT NULL AUTO_INCREMENT PRIMARY KEY,
description CHAR(50),
bin_data LONGBLOB,
filename CHAR(50),
filesize CHAR(50),
filetype CHAR(50)
);
Perhaps this page (http://www.onlamp.com/pub/a/onlamp/2002/05/09/webdb2.html) might be even better for you.
Mainly you just need the page to upload to the mysql server correct? The link shown helps with that.
abcjfk
01-26-2007, 10:15 AM
i m using microsoft sql server 2005 and need to develop a property website and try to match each properties with their images.
Some friends of mine, told me store the path of the images in the database and retrieve it from the disk. Dont know how to implement this though? Any help will be great.
Or is there a simple way to do this?
vBulletin® v3.7.2, Copyright ©2000-2008, Jelsoft Enterprises Ltd.