Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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.

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)

Posted

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.

wayne

 

The Road Goes on Forever and the Party Never Ends - Robert Earl Keen

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...