Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Inserting an Image into a SQL Database

Status
Not open for further replies.

welshone

Programmer
Jul 30, 2001
414
0
0
GB
Hello again,

How do I go about inserting an image into a sql database ?

My fieldtype is image, and the files exist on the server, so I don't need to upload the files.

I just want to insert object into a database. ?

any ideas ?
 
try setting the type to BLOB
it worked for me when i had this problem
 
How about not doing it at all? if the images are already on the server, a better solution is to set a field to the path of the image. (ie string = /images/pic1.gif) then just select the string from the db and away you go.

why?

Better db performance - binary objects take a lot of time and space in the db - quicker to access a small string

smaller db- doesn't bloat with images

hth
Bastien

There are many ways to skin this cat,
but it still tastes like chicken
 
This what i put in the db when i nrrd images

<img src=&quot;pics/transp.gif&quot; width=&quot;70&quot; height=&quot;8&quot;>

or whatever i need to build my page. Have Fun...

Sharky99 >:):O>
 
Problem is I need the image in my db so I can use it with Crystal Reports.
 
Sorry i don't know a thing about Crystal...

Have Fun...

Sharky99 >:):O>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top