Skip to main content
Inspiring
Nov 17, 2006 1:01 PM UTC
Question

Insert record problem

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 is closed to new replies. Start a new post to keep the conversation going.

2 replies

Inspiring
Nov 17, 2006 7:47 PM UTC
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.
>


Translate
Known Participant
Nov 17, 2006 4:36 PM UTC
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.
Translate