error when posting new record with empty fields

error when posting new record with empty fields

am 06.11.2004 20:23:27 von TB

This will probably be considered a newbie question, and guess what: I am
indeed a newbie. So please bear with me:

I have created a database editor in ASP connecting to an Access DB, and
everything works perfect, EXCEPT when a field is left empty while adding or
modifying a record. As a result, an error is returned from the server.

My Access database is designed to accept empty fields.

Right now I have designed a work-around whereby a default value is stored in
a field in case the user does provide any data. However, I would like to be
able to store empty values in a record.

Any suggestions would be greatly appreciated. Thanks.

TB

Re: error when posting new record with empty fields

am 06.11.2004 21:51:57 von reb01501

TB wrote:
> This will probably be considered a newbie question, and guess what: I
> am indeed a newbie. So please bear with me:
>
> I have created a database editor in ASP connecting to an Access DB,
> and everything works perfect, EXCEPT when a field is left empty while
> adding or modifying a record. As a result, an error is returned from
> the server.
> My Access database is designed to accept empty fields.
>
> Right now I have designed a work-around whereby a default value is
> stored in a field in case the user does provide any data. However, I
> would like to be able to store empty values in a record.
>
> Any suggestions would be greatly appreciated. Thanks.
>
> TB

These are probably Text fields, right? Open your database in Access, open
your table in Design View and look at the properties of one of the Text
fields. You should see a property called something like "Allow zero-length
strings". Set it to allow zero-length strings. Also, make sure the Required
property is false.

Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"