Groups | Blog | Home
all groups > sql server odbc > june 2004 >

sql server odbc : Added text field to database. New entries not equal to "" ???


Noozer
6/17/2004 8:11:20 PM
Hi!

I'm accessing an MS Access database from an ASP server.

I just added a new text column (field) to one of my tables. I have not added
any data to this new field in any of the rows.

I read the field in and compare it to "" and it's coming up as false.

How do identify the empty fields?

'ASP code - Never produces "Blank"
if rsSet("region") = "" then response.write "Blank" else response.write
rsSet("region")

Douglas J. Steele
6/17/2004 8:33:41 PM
And there are sometimes occasions when it could be a Null, or it could be a
blank. If you want to check for both at once, use:

If Len(rsSet("region") & "") = 0 Then Response.Write "Nothing" Else
Response.Write rsSet("region")

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


[quoted text, click to view]

Noozer
6/17/2004 9:09:20 PM
Thanks!

[quoted text, click to view]

Alan Howard
6/18/2004 8:29:41 AM
Try

If IsNull (rsSet("region")) Then Response.Write "Null" Else Response.Write
rsSet("region")

Alan

[quoted text, click to view]

AddThis Social Bookmark Button