Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 How do I update a field to empty??
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

leblanc9425
New Member

USA
92 Posts

Posted - 12 August 2003 :  13:04:27  Show Profile  Visit leblanc9425's Homepage
This should be easy, but how to I update a database field (using Access 2000) to show a completely empty field?

My problem is, that after I write some data into a field and then try to remove the data via using "update" it seems to leave an "invisible" character (like a space). So, when I try to locate all records where the field "isNull", the updated fields are NOT null because of this invisible space character.

When I open the database table, the field looks empty (hence why I call it invisible) but there is actually a space character in it. The only way to fix it, is to enter text, then highlight the cell and delete.

This is similiar to what I have done to update the field "masspaydate"
from a field WITH data (somevalue) to one that should be empty:

dim empty
empty=""

mySQL="UPDATE masspay set masspaydate='"&empty&"' where masspaydate='"&somevalue&"'"
set rs=openRSexecute(mySQL)

www.Slug-Lines.com
Snitz Version 3.4.07

Anacrusis
Junior Member

USA
219 Posts

Posted - 12 August 2003 :  14:33:28  Show Profile  Visit Anacrusis's Homepage  Send Anacrusis an AOL message
Update table set field = NULL where condition = true

The Internet ClubHouse
www.internet-clubhouse.com
Go to Top of Page

leblanc9425
New Member

USA
92 Posts

Posted - 12 August 2003 :  15:49:08  Show Profile  Visit leblanc9425's Homepage
Thanks Anacrusis! It kills me that I spent a few hours trying to figure this out....

www.Slug-Lines.com
Snitz Version 3.4.07
Go to Top of Page

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 12 August 2003 :  17:29:24  Show Profile
Note, there is a difference between Null and Empty. You were setting the fields to Empty, but were searching for Null, that's why you didn't find anything.

Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~
Go to Top of Page

Anacrusis
Junior Member

USA
219 Posts

Posted - 12 August 2003 :  21:37:32  Show Profile  Visit Anacrusis's Homepage  Send Anacrusis an AOL message
Good point Nikkol.

The Internet ClubHouse
www.internet-clubhouse.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.27 seconds. Powered By: Snitz Forums 2000 Version 3.4.07