Link to home
Start Free TrialLog in
Avatar of Sebina
Sebina

asked on

Retrieve image with sql statement based on filename

I have a (sql server) database with a table containing logo files of companies. For a better performance only the filename is saved to the table (so it is not a BLOB field). All image files are in the same directory. For example the path is "e:\images" and the filename is in field strPictureLogo of tblCompany. Is it possible to build a sql statement that retrieves the image files, so that the view contains the images?
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

i would say no...
Do you mean you want the images or just the full path:
If the latter:


select 'e:\images\' + strpicturelogo as logopath
from tblcompany

Cheers.
Avatar of Sebina
Sebina

ASKER

I do not mean the full path! I would like to have the image in a view as if the image was in the database.
I know that Access has this feature, but SQL Server doesn't ...
I agree with Angelll
Out interest, what client do you want to run this SQL/view from?
Avatar of Sebina

ASKER

I want the images to appear on a Crystal Report which is opened from ASP (in a web application).
Since it is not possible to change the path of an image when opening the Crystal Report from ASP (though this is possible from a VB application) I need the images to be included in a view.

Thanks for your comments.
ASKER CERTIFIED SOLUTION
Avatar of niklausj
niklausj

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Sebina

ASKER

So it just seems not possible to add pictures to a view without having the pictures in a (temporary) table. I now have simply saved the pictures to a table directly. Thanks for your help.

Sebina