Forums

This topic is locked

Insert Records

Posted 10 Dec 2002 12:14:25
1
has voted
10 Dec 2002 12:14:25 Carlos Leal posted:
When I select a form, to insert in a database, sometimes I have one error, it's when the user doesn't fill one or more textfields, then the records aren't insert and the page gives me an error. Is there anything that I can do, without make all textfields required?

Replies

Replied 10 Dec 2002 13:32:07
10 Dec 2002 13:32:07 Kent Steelman replied:
Check your database table/query that you are writting to. The field that is being left blank may be a required data field and hence will not allow a null value. If this is the case you must make the user fill in the field with a value (there is an extention that will handle this error for you), or you can turn off the requirement for data to be placed into the database table, or you can place a defaulte value into the field (this can be done at the form level or the database table level). But first you must determine if the datafield needs to be populated.

Wm. Kent Steelman
Replied 10 Dec 2002 17:06:18
10 Dec 2002 17:06:18 Carlos Leal replied:
Thanks for your answers, but can you explain me better one thing, how do I know if the field in the data base is required? And how to turn off?

Carlos Leal

Edited by - carlosleal on 10 Dec 2002 17:07:00
Replied 10 Dec 2002 17:47:34
10 Dec 2002 17:47:34 Kent Steelman replied:
That will depend on the database. If it is MS Access, then you open the database with MS Access and open the table up in design mode. Highlight the field and then look at the properites of the fields. If the property "Required" has a "Yes" listed then it has been established as a required field. All DB development tools are basically the same and will allow the user to change the properties. If you can open up the database then ask the DB designer/programer for assistance.

Wm. Kent Steelman
Replied 10 Dec 2002 18:45:15
10 Dec 2002 18:45:15 Carlos Leal replied:
My database is in MS Access, but all my fields have "No" in the property "Required".

I have my site on the web, and when the form is submited, gives me the error if any textfield isn't fill, but if all textfields are fill, then no error appear! What could be the problem?

Carlos Leal
Replied 14 Dec 2002 15:28:21
14 Dec 2002 15:28:21 Kent Steelman replied:
Here is some more informationfor you on the issue. If the field is a text field in the access table properties you must set property to "Yes" to the following two fields. Required and Allow Zero Length.

Wm. Kent Steelman

Reply to this topic