HELP: how to allow a zero-length date-field(access db)?

Results 1 to 5 of 5

Thread: HELP: how to allow a zero-length date-field(access db)?

  1. #1
    Isabelle Guest

    Default HELP: how to allow a zero-length date-field(access db)?

    Hi,<BR><BR>how can you allow a zero-length date-field in an access db?<BR>With a text-field, you can set the "allow zero-length" to &#039yes&#039, but there&#039s no such possibility in a date-field<BR><BR>please help<BR>Thanks<BR>

  2. #2
    Bijal Guest

    Default RE: HELP: how to allow a zero-length date-field(access db)?

    Hi Isabelle,<BR><BR>I am having similar problems with other datatypes in my database.<BR>Like i have the following datatypes:<BR>Number, Text, Date, Yes/No, Memo<BR><BR>The field having the datatype "Number" is the primary key.<BR>For that i have the field properties - <BR>Required-->Yes<BR>Indexed-->Yes(No Duplicates)<BR><BR>Similarly for "Text" field the properties are - <BR>Required-->Yes<BR>Allow Zero Length-->No<BR>Indexed-->No<BR><BR>For the "Date" field the properties are - <BR>Required-->Yes<BR>Indexed-->No<BR><BR>For the "Yes/No" field the properties are - <BR>Required-->Yes<BR>Indexed-->No<BR><BR>For the "Memo" field the properties are - <BR>Required-->Yes<BR>Allow Zero Length-->No<BR><BR>Whenever i run my ASP file i get this error:<BR><BR>Microsoft OLE DB Provider for ODBC Drivers error &#039 80004005&#039 <BR>[Microsoft][ODBC Microsoft Access 97 Driver] The field &#039Application.ApplicationID&#039 can&#039t contain a Null value because the Required property for this field is set to True.<BR>Enter a value in this field. <BR>/ASPTest/Bijal/Mock_Test/default.asp, line 159 <BR><BR>I get similar errors for all the other fields.<BR><BR>Since you seem to have the same problem please let me know if you have any solutions.<BR><BR>Thanks,<BR>Bijal.<BR>

  3. #3
    Isabelle Guest

    Default RE: HELP: how to allow a zero-length date-field(access db)?

    BIJAL,<BR><BR>you know that you can change these settings?<BR>Just set all your fields(except your key-field) to <BR><BR>Required : no<BR>allow zero-length : yes<BR><BR>This will work, but I still have problems with the date-field<BR><BR>

  4. #4
    Join Date
    Dec 1969
    Posts
    395

    Default RE: HELP: how to allow a zero-length date-field(access db)?

    I have the same problem... you might already do this, but what I do is just enter something like "1/1/1800" for "null" dates, then when you want to display that information somewhere, right code that will display nothing if it&#039s "1/1/1800".


  5. #5
    Isabelle Guest

    Default RE: HELP: how to allow a zero-length date-field(access db)?

    you have to set yuor date-field explicitely to "NULL" in your validation and then it works!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •