Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
tscbill5
Starting Member
2 Posts |
Posted - 2007-05-21 : 10:51:09
|
I have created an employee directory that displays a picture from a folder based on a consistent naming scheme. I need to set a deault value for the picture for when a photo by that name does not exist in the folder. I've tried using both the ISNULL and ISNOTHING commands. Does anyone know how to do this? |
|
jhermiz
3564 Posts |
Posted - 2007-05-21 : 13:52:47
|
quote: Originally posted by tscbill5 I have created an employee directory that displays a picture from a folder based on a consistent naming scheme. I need to set a deault value for the picture for when a photo by that name does not exist in the folder. I've tried using both the ISNULL and ISNOTHING commands. Does anyone know how to do this?
Use the len function.=IIF(Len(Fields.MyField.Value) = 0, "path to no image", mypath)Programmers HowTo's -- [url]http://jhermiz.googlepages.com[/url] |
|
|
tscbill5
Starting Member
2 Posts |
Posted - 2007-05-21 : 14:35:03
|
I may not have described it that well. To find what picture it displays it takes a path and then out of a table it takes the lastname and firstname fields and formats them together as lastname_firstname.jpg as the file name so no matter what there is always a string, but there is not always a file that corresponds to it. So i need something that can return a different picture if the one its looking for doesnt exist. |
|
|
|
|
|