February 3, 2003 at 11:12 am
Hi,
I am having problems in storing images to my SQL server database tables. I am using ADO stream object in my ASP code to store image.
Set myStream = CreateObject("ADODB.Stream")
myStream.Type = adTypeBinary
myStream.Open
myStream.LoadFromFile "C:\File.jpg"
rst("imgField") = myStream.Read
rst.Update
It works fine if the images are stored on the Hard drive.
The problem is, I want to pass the URL of the image, instead of the file name. I would greatly appreciate if any one can help me out of this problem.
thank you in advance,
Vijju2k
February 5, 2003 at 12:52 pm
I've played with storing images in the database before in SQL2K. I basically have a web application that allows the user to select the image to load into the database. The 'catch' behind it is that both the server and the client need to have access to the file in order for it to be copied.
So I map a drive letter on the server(Z:) between the server and the client which points to the same location and then the client selects the image from Z:\. The server and IIS (IIS Service account needs access to the share location on the server) can access it.
I don't believe it would be possible to pull an image from the URL since technically it is going to the Internet temporary files directory with a random name.
Regards,
Chris
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply