|
| |
|
|
Sandalwood
Posts: 233 Joined: 12/18/2002 From: New Jersey! Status: offline
|
Blank database results blues - 12/18/2002 10:52:09
I am trying to keep the database results page from displaying a blank space when the column value returned was blank. For example, <<age>> <<weight>> <<marital_status>> would produce this: (if there was nothing in the weight column) 27 single And I wanted to get this: 27 single Can someone tell me how to do this? I have been trying to figure it out for 2 days!
|
|
|
|
Sandalwood
Posts: 233 Joined: 12/18/2002 From: New Jersey! Status: offline
|
RE: Blank database results blues - 12/18/2002 11:30:27
I meant it would produce this: 27 single (Two spaces between 27 and single because the weight field was left blank) Dave
|
|
|
|
rdouglass
Posts: 9279 From: Biddeford, ME USA Status: offline
|
RE: Blank database results blues - 12/18/2002 13:14:35
You could also do it with a table. As long as you have at least a space, you' re tables should be fine across browser types and give you the results you expect (IMO)...
|
|
|
|
Sandalwood
Posts: 233 Joined: 12/18/2002 From: New Jersey! Status: offline
|
RE: Blank database results blues - 12/18/2002 13:44:37
I get a message saying the contents of a frontpage component have been modified and will be overwritten when I save the page, and then the code is deleted?
|
|
|
|
rdouglass
Posts: 9279 From: Biddeford, ME USA Status: offline
|
RE: Blank database results blues - 12/18/2002 14:09:43
You have to put the DRW on a Spooky Diet first. Then your code should stay....
|
|
|
|
rdouglass
Posts: 9279 From: Biddeford, ME USA Status: offline
|
RE: Blank database results blues - 12/18/2002 15:04:28
Sorry, but you gave me a link to a results page. I wouldn' t see any of the FP code here. You' ll need to look at the page in FrontPage under the HTML View tab to see all the FP ' greycode' ....
|
|
|
|
Sandalwood
Posts: 233 Joined: 12/18/2002 From: New Jersey! Status: offline
|
RE: Blank database results blues - 12/18/2002 15:25:49
OK, I was able to delete the ' greycode' but I get a runtime error when I insert bobby' s code. Any suggestions?
|
|
|
|
Sandalwood
Posts: 233 Joined: 12/18/2002 From: New Jersey! Status: offline
|
RE: Blank database results blues - 12/18/2002 15:57:44
The record source is named " Results" , which is what I changed the " weight" to, but I still got this error message: Microsoft VBScript runtime error ' 800a000d' Type mismatch: ' rs' Where in the .asp does your code need to go?
|
|
|
|
rdouglass
Posts: 9279 From: Biddeford, ME USA Status: offline
|
RE: Blank database results blues - 12/18/2002 16:09:34
bobby' s solution was NOT using the DRW (which I suspect you are). The ' weight' bobby' s referring to is a field name. So if your DRW uses code like: <%=FP_FieldVal(fp_rs," weight" )%> then bobby' s solution would look like: <% if trim(FP_FieldVal(fp_rs," weight" )) = " " then response.write " <p>Not available</p>" else response.write FP_FieldVal(fp_rs," weight" ) end if %> I used trim(FP_FieldVal(fp_rs," weight" )) ' cause Fp usually ' pads' the empty fields with a space. Does that help get you moving?
|
|
|
|
Sandalwood
Posts: 233 Joined: 12/18/2002 From: New Jersey! Status: offline
|
RE: Blank database results blues - 12/18/2002 16:22:39
Well, I don' t get the error anymore, but I am still not getting " Not Available" returned, just the stupid blank space! AAAAAAARRRRGHH!
|
|
|
|
rdouglass
Posts: 9279 From: Biddeford, ME USA Status: offline
|
RE: Blank database results blues - 12/18/2002 16:25:47
Can you post the code between the lines: <!--#include file=" _fpclass/fpdbrgn1.inc" --> and: <!--#include file=" _fpclass/fpdbrgn2.inc" -->
|
|
|
|
Sandalwood
Posts: 233 Joined: 12/18/2002 From: New Jersey! Status: offline
|
RE: Blank database results blues - 12/18/2002 16:29:17
Yes
|
|
|
|
Sandalwood
Posts: 233 Joined: 12/18/2002 From: New Jersey! Status: offline
|
RE: Blank database results blues - 12/19/2002 13:50:20
Hey, that worked! Thanks to all who have helped me. I have been searching for answers on sites and in forums for a couple of days, but this is by far the best forum. I will be back to help out others if I can. Thanx!
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|