Skip to main content
Inspiring
November 17, 2006
Question

Insert record problem

  • November 17, 2006
  • 2 replies
  • 280 views
I have a simple form which inserts data into a database, however, one
checkbox in the form
displays 4 extra text fields (hidden unless checked). If the box is checked,
the data from these extra fields are inserted into the db no problem, but if
left unchecked the form fails.
Is there a way around this problem? test page here
http://www.webewitch.com/form.asp
Thank you
Gary


This topic has been closed for replies.

2 replies

Inspiring
November 17, 2006
Update works great, thanks!
One other thing, do you know if there's a way of 'clearing' those hidden
text fields when the checkbox
is unchecked so they don't pass the initial value to the db?
Thanks again
Gary


"acidrain9" <webforumsuser@macromedia.com> wrote in message
news:ejkoe2$ec5$1@forums.macromedia.com...
> You might try using an UPDATE Statement instead.
>
> Check to make sure that the maxlength the input fields are matched to the
> field length of the database fields, and also check the formats of you
> database
> fields.
>
> You will get this error if you are trying to put 6 characters into a field
> that only accepts 5, or if you are trying to put text letters into a field
> that
> only accepts numbers.
>


Known Participant
November 17, 2006
You might try using an UPDATE Statement instead.

Check to make sure that the maxlength the input fields are matched to the field length of the database fields, and also check the formats of you database fields.

You will get this error if you are trying to put 6 characters into a field that only accepts 5, or if you are trying to put text letters into a field that only accepts numbers.