Boolean fields and SQL Database

L

LauraK

I have a FrontPage 2003 application form that feeds into a SQL table.
Everything works great except on my custom confirmation page where Yes/No
questions appear as True/False. Is there a way to change the confirmation
page to display Yes if the answer is True and No if it is false?

I've tried changing the code in the form using a dim statement but it isn't
working. I thought it might be easier to just change the way the field
displays on the confirmation page. Thanks!
 
S

Stefan B Rusynko

Of for the field display itself
<% IF fieldname=TRUE THEN%>YES<%Else%>NO<%END IF%>

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
_____________________________________________


| I'm not sure what a Select statement looks like when using SQL, but could
| you try something like this?
|
| select iif(YesNoField <> 0, 'Yes', 'No') AS YesOrNo
| from table
|
|
| --
|
| ~ Kathleen Anderson
| Microsoft MVP - FrontPage
| Spider Web Woman Designs
| Expression Web Resources: http://www.spiderwebwoman.com/xweb/
| FrontPage Resources: http://www.spiderwebwoman.com/resources/
| Please reply to the newsgroup for the benefit of others
|
|
|
| | >I have a FrontPage 2003 application form that feeds into a SQL table.
| > Everything works great except on my custom confirmation page where Yes/No
| > questions appear as True/False. Is there a way to change the confirmation
| > page to display Yes if the answer is True and No if it is false?
| >
| > I've tried changing the code in the form using a dim statement but it
| > isn't
| > working. I thought it might be easier to just change the way the field
| > displays on the confirmation page. Thanks!
|
|
 
L

LauraK

Thanks Stefan, I'm not sure where to put it on the confirmation page.
FrontPage inserts <!--webbot bot="ConfirmationField" s-field="Topic1" --> for
the field. Would I include your code along with the webbot bot= or in place
of?
 
S

Stefan B Rusynko

FP Confirmation pages do not support ASP
- the must be .htm pages

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
_____________________________________________


| Thanks Stefan, I'm not sure where to put it on the confirmation page.
| FrontPage inserts <!--webbot bot="ConfirmationField" s-field="Topic1" --> for
| the field. Would I include your code along with the webbot bot= or in place
| of?
|
| "Stefan B Rusynko" wrote:
|
| > Of for the field display itself
| > <% IF fieldname=TRUE THEN%>YES<%Else%>NO<%END IF%>
| >
| > --
| >
| > _____________________________________________
| > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > "Warning - Using the F1 Key will not break anything!" (-;
| > _____________________________________________
| >
| >
| > | I'm not sure what a Select statement looks like when using SQL, but could
| > | you try something like this?
| > |
| > | select iif(YesNoField <> 0, 'Yes', 'No') AS YesOrNo
| > | from table
| > |
| > |
| > | --
| > |
| > | ~ Kathleen Anderson
| > | Microsoft MVP - FrontPage
| > | Spider Web Woman Designs
| > | Expression Web Resources: http://www.spiderwebwoman.com/xweb/
| > | FrontPage Resources: http://www.spiderwebwoman.com/resources/
| > | Please reply to the newsgroup for the benefit of others
| > |
| > |
| > |
| > | | > | >I have a FrontPage 2003 application form that feeds into a SQL table.
| > | > Everything works great except on my custom confirmation page where Yes/No
| > | > questions appear as True/False. Is there a way to change the confirmation
| > | > page to display Yes if the answer is True and No if it is false?
| > | >
| > | > I've tried changing the code in the form using a dim statement but it
| > | > isn't
| > | > working. I thought it might be easier to just change the way the field
| > | > displays on the confirmation page. Thanks!
| > |
| > |
| >
| >
| >
 
L

LauraK

Thanks Stefan. I find your response interesting as I have an .asp
confirmation page that works just fine. But back to my original question,
you suggested I use
<% IF fieldname=TRUE THEN%>YES<%Else%>NO<%END IF%>. Is this statement going
 
S

Stefan B Rusynko

"fieldname" is the form field name/value used in your form

In ASP any form field name and it's value is obtained by using
<% formfield = Request.Form("yourfieldnamehere") %>
See http://www.w3schools.com/asp/asp_inputforms.asp

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
_____________________________________________


| Thanks Stefan. I find your response interesting as I have an .asp
| confirmation page that works just fine. But back to my original question,
| you suggested I use
| <% IF fieldname=TRUE THEN%>YES<%Else%>NO<%END IF%>. Is this statement going
| on the confirmation page to change the way it is displayed or is it part of
| the form field? If it goes on the confirmation page, where does it go?
|
| "Stefan B Rusynko" wrote:
|
| > FP Confirmation pages do not support ASP
| > - the must be .htm pages
| >
| > --
| >
| > _____________________________________________
| > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > "Warning - Using the F1 Key will not break anything!" (-;
| > _____________________________________________
| >
| >
| > | Thanks Stefan, I'm not sure where to put it on the confirmation page.
| > | FrontPage inserts <!--webbot bot="ConfirmationField" s-field="Topic1" --> for
| > | the field. Would I include your code along with the webbot bot= or in place
| > | of?
| > |
| > | "Stefan B Rusynko" wrote:
| > |
| > | > Of for the field display itself
| > | > <% IF fieldname=TRUE THEN%>YES<%Else%>NO<%END IF%>
| > | >
| > | > --
| > | >
| > | > _____________________________________________
| > | > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > | > "Warning - Using the F1 Key will not break anything!" (-;
| > | > _____________________________________________
| > | >
| > | >
| > | > | I'm not sure what a Select statement looks like when using SQL, but could
| > | > | you try something like this?
| > | > |
| > | > | select iif(YesNoField <> 0, 'Yes', 'No') AS YesOrNo
| > | > | from table
| > | > |
| > | > |
| > | > | --
| > | > |
| > | > | ~ Kathleen Anderson
| > | > | Microsoft MVP - FrontPage
| > | > | Spider Web Woman Designs
| > | > | Expression Web Resources: http://www.spiderwebwoman.com/xweb/
| > | > | FrontPage Resources: http://www.spiderwebwoman.com/resources/
| > | > | Please reply to the newsgroup for the benefit of others
| > | > |
| > | > |
| > | > |
| > | > | | > | > | >I have a FrontPage 2003 application form that feeds into a SQL table.
| > | > | > Everything works great except on my custom confirmation page where Yes/No
| > | > | > questions appear as True/False. Is there a way to change the confirmation
| > | > | > page to display Yes if the answer is True and No if it is false?
| > | > | >
| > | > | > I've tried changing the code in the form using a dim statement but it
| > | > | > isn't
| > | > | > working. I thought it might be easier to just change the way the field
| > | > | > displays on the confirmation page. Thanks!
| > | > |
| > | > |
| > | >
| > | >
| > | >
| >
| >
| >
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top