|
 |
asp_databases thread: Data returned from Access as True/False not Yes/No
Message #1 by "Ken Dowling" <ken.dowling@o...> on Wed, 12 Sep 2001 17:52:28
|
|
Hi All,
I hope you can help with this one. I have an access 2000 db with yes/no
fields. I query the db through asp and get my results back. e.g. Select *
from table where ...
However, when my results are displayed the yes/no fields from the access
db now display as true/false. The field types within access are set to
yes/no. How can I set the data return to be yes/no.
Any ideas would be really appreciated.
Regards,
Ken Dowling
Message #2 by Kyle Burns <kburns@c...> on Wed, 12 Sep 2001 13:28:18 -0500
|
|
Yes/No only affects the way that the Access engine displays your data, not
how it is stored. AFAIK, the display settings have no effect on what is
returned via ADO (e.g. a boolean field, which is what Access calls yes/no,
will either return True or False). If you want to display yes/no then you
will need to write additional code to handle this. One possible solution is
to write a function that accepts a boolean value and either returns the
string "Yes" or "No".
Function DisplayBool(BooleanValue)
If BooleanValue = True Then
DisplayBool = "True"
Else
DisplayBool = "False"
End If
End Function
=================================
Kyle M. Burns, MCSD
ECommerce Technology Manager
Centra Credit Union
kburns@c...
-----Original Message-----
From: Ken Dowling [mailto:ken.dowling@o...]
Sent: Wednesday, September 12, 2001 12:52 PM
To: ASP Databases
Subject: [asp_databases] Data returned from Access as True/False not
Yes/No
Hi All,
I hope you can help with this one. I have an access 2000 db with yes/no
fields. I query the db through asp and get my results back. e.g. Select *
from table where ...
However, when my results are displayed the yes/no fields from the access
db now display as true/false. The field types within access are set to
yes/no. How can I set the data return to be yes/no.
Any ideas would be really appreciated.
Regards,
Ken Dowling
|
|
 |