Click here to Skip to main content
15,902,299 members
Home / Discussions / Web Development
   

Web Development

 
GeneralRe: IIS--> Windows NT Pin
jphuphilly27-Aug-04 10:47
jphuphilly27-Aug-04 10:47 
QuestionHow to transfer data in Real Time over the net Pin
Deepak Samuel26-Aug-04 5:55
Deepak Samuel26-Aug-04 5:55 
AnswerRe: How to transfer data in Real Time over the net Pin
alex.barylski26-Aug-04 9:47
alex.barylski26-Aug-04 9:47 
AnswerRe: How to transfer data in Real Time over the net Pin
Anonymous26-Aug-04 14:42
Anonymous26-Aug-04 14:42 
GeneralEnter char Pin
Brendan Vogt26-Aug-04 2:38
Brendan Vogt26-Aug-04 2:38 
GeneralRe: Enter char Pin
David Salter26-Aug-04 5:46
David Salter26-Aug-04 5:46 
GeneralSQL Server - NULL Values Pin
Brendan Vogt26-Aug-04 2:37
Brendan Vogt26-Aug-04 2:37 
GeneralRe: SQL Server - NULL Values Pin
Colin Angus Mackay26-Aug-04 12:29
Colin Angus Mackay26-Aug-04 12:29 
Brendan Vogt wrote:
If I have an empty textbox, and the related field in the database table does not require a value, is better to write the value as '', or should I enter a NULL value?

That depends on your datamodel. A NULL value is typically defined as meaning an absence of data. Whereas an empty string could mean that there is data and it was an empty string.

I read recently, although I've not tested this myself, that adding NULL values to a database slows it down and so should be only used where necessary. In other words you should only use it if you genuinely have a need to represent a gap in the data.

There is a System.DBNull[^] class in the .NET Framework to represent Null values in a database.

When you create your SQL Command you assign DBNull.Value to the relevant parameter. When you read data from the database you need to check the object being returned to see whethere it is a DBNull.Value before doing anything else with it. This adds extra steps to the process when you read and write data to the database.

If you still can't decide one way or the other: I would say that for a description field, an empty string would be better than a null value.




"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell

Not getting the response you want from a question asked in an online forum: How to Ask Questions the Smart Way!


GeneralRe: SQL Server - NULL Values Pin
Jon Sagara26-Aug-04 15:02
Jon Sagara26-Aug-04 15:02 
GeneralRe: SQL Server - NULL Values Pin
Brendan Vogt27-Aug-04 0:43
Brendan Vogt27-Aug-04 0:43 
GeneralRe: SQL Server - NULL Values Pin
Jon Sagara27-Aug-04 2:29
Jon Sagara27-Aug-04 2:29 
GeneralGetRows() method Pin
Brendan Vogt26-Aug-04 2:34
Brendan Vogt26-Aug-04 2:34 
GeneralPulling Client Computer Name Pin
BigRod25-Aug-04 21:13
BigRod25-Aug-04 21:13 
GeneralRe: Pulling Client Computer Name Pin
David Salter26-Aug-04 5:51
David Salter26-Aug-04 5:51 
GeneralRe: Pulling Client Computer Name Pin
basementman26-Aug-04 7:44
basementman26-Aug-04 7:44 
GeneralRe: Pulling Client Computer Name Pin
kumar_manoj7729-Aug-04 21:14
kumar_manoj7729-Aug-04 21:14 
GeneralASP & JavaScript Pin
TrungHuynh25-Aug-04 15:04
TrungHuynh25-Aug-04 15:04 
GeneralIIS Shortcut missing Pin
Brent Lamborn25-Aug-04 13:38
Brent Lamborn25-Aug-04 13:38 
Generalcreate cookie file on client Pin
sas222225-Aug-04 10:25
sas222225-Aug-04 10:25 
GeneralRe: create cookie file on client Pin
sas222226-Aug-04 5:32
sas222226-Aug-04 5:32 
GeneralASP-Logging Pin
pat27088125-Aug-04 3:29
pat27088125-Aug-04 3:29 
GeneralUsing SoapLogger and SoapLoggerAttribute Pin
pat27088124-Aug-04 11:59
pat27088124-Aug-04 11:59 
GeneralASP Pin
mkdas7023-Aug-04 2:13
mkdas7023-Aug-04 2:13 
GeneralRe: ASP Pin
Not Active23-Aug-04 8:28
mentorNot Active23-Aug-04 8:28 
GeneralRe: ASP Pin
Adam Hable23-Aug-04 12:46
Adam Hable23-Aug-04 12:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.