E
Eric Layman
Hi everyone,
Im puzzled by a NULL behaviour in SQL 2000 server.
There is a column in the table that does not allow NULL.
During data mining, the staff noted that, for that particular column, there
are a few records that are empty.
I do not specifically know whether they are "alt + 0160" character.
What are the reasons that can cause this to happen?
Validation front end, I've used ASP.NET's REQUIREDFIELDVALIDATOR on the
control to ensure that the field is compulsory
On the application scripting, I've the following to cleanse the data before
the data goes into the database:
cmd.Parameters.Add("@STREET_NAME", Data.SqlDbType.VarChar)
cmd.Parameters("@STREET_NAME").Value =
ReplaceSingleQuote(streetname.Text.Trim())
The function is:
Public Shared Function ReplaceSingleQuote(ByVal x As String)
If x = "" Then
Return x
End If
x = x.Replace("'", "''")
Return x
End Function
Im puzzled by a NULL behaviour in SQL 2000 server.
There is a column in the table that does not allow NULL.
During data mining, the staff noted that, for that particular column, there
are a few records that are empty.
I do not specifically know whether they are "alt + 0160" character.
What are the reasons that can cause this to happen?
Validation front end, I've used ASP.NET's REQUIREDFIELDVALIDATOR on the
control to ensure that the field is compulsory
On the application scripting, I've the following to cleanse the data before
the data goes into the database:
cmd.Parameters.Add("@STREET_NAME", Data.SqlDbType.VarChar)
cmd.Parameters("@STREET_NAME").Value =
ReplaceSingleQuote(streetname.Text.Trim())
The function is:
Public Shared Function ReplaceSingleQuote(ByVal x As String)
If x = "" Then
Return x
End If
x = x.Replace("'", "''")
Return x
End Function