mike55 Posted August 31, 2005 Posted August 31, 2005 Hi, I have done a select * on a particular table and I have retrieved all the necessary data. One of the fields that I am retrieving has the datetime 01/01/1753 00:00:00 assigned to it in the database if the user never supplied a value. When I am either selecting or after I do the select is it possible for me to set the field value to blank/null so that the user sees nothing. If any other datetime then show the value. Mike55. Quote A Client refers to the person who incurs the development cost. A Customer refers to the person that pays to use the product. ------ My software never has bugs. It just develops random features. (Mosabama vbforums.com)
wayneph Posted August 31, 2005 Posted August 31, 2005 Instead of doing select *, I would select the exact columns that you need. Then you can use SQL to return the blanks directly from the database. The syntax will be a little different depending on what database you're using but in SQL Server, it would be the CASE WHEN construct, and in Access it would be an IIf(...) statement. Then you're ASP code doesn't have to worry about the value at all. It's already taken care of. Quote wayne The Road Goes on Forever and the Party Never Ends - Robert Earl Keen
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.