Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Insert record problem

LEGEND ,
Nov 17, 2006 Nov 17, 2006
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


TOPICS
Server side applications
281
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 17, 2006 Nov 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.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 17, 2006 Nov 17, 2006
LATEST
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
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines