[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 192
  • Last Modified:

Cannot change the value of a field to zero lenght using Visual Basic 6.0 and a Microsoft Access 2000 Database

I am using Visual Basic 6.0 and a Microsoft Access 2000 Database.  I am using a ADO data control.  Once I write to a field I cannot delete the value in the field. For instance if I enter a value in the field  phone number and which to delete it because the patient has no phone number or has had it disconnected, I get the following error message: [Microsoft][ODBC Microsoft Access Driver] Field'demograpTbl.PhoneNumber' cannot be zero-length string.  The field property is set so that PhoneNumber is not a require field.
0
PARADELA
Asked:
PARADELA
  • 4
  • 2
1 Solution
 
Rey Obrero (Capricorn1)Commented:
required property of the field is different from allow zero length
0
 
Rey Obrero (Capricorn1)Commented:
allow zero length should be set to Yes
0
 
Rey Obrero (Capricorn1)Commented:
using ADO
use Column.Properties("Set OLEDB:Allow Zero Length")
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
Arthur_WoodCommented:
You can also set the value of he field to " " ( a single Blank character).  But setting the Allow Zero Length property on the field in the table to Yes, is the better solution.

AW
0
 
Rey Obrero (Capricorn1)Commented:
<lol>
0
 
Arthur_WoodCommented:
oh well, what can I say?

AW
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now