CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 Values "NULL"

Print topic Send  topic

Author Message
Anthony
Posted: 08/10/2002, 11:11 AM

I have created several applications that DOES NOT require al fields to be filled out. When I submit the application with blank fields Im getting Mysql error:

Database error: Invalid SQL: INSERT INTO `users` (`username`, `password`, `Company_Name`, `Position`, `Contact_First_Name`, `Contact_Last_Name`, `Billing_Address`, `City`, `State`, `Postal_Code`, `Phone`, `Email`, `Fax`, `Preference1`, `Preference2`, `Preference3`) VALUES ('gh', 'jgfhj', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL)
MySQL Error: 1048 (Column 'Company_Name' cannot be null)
Session halted.

My database fields are set to 'Not-Null' so why the error.

any suggestions?
Would removing the 'value' attribute from the HTML form correct this or do I have to modify something else.
char
Posted: 08/11/2002, 6:55 AM


Anthony

"I have created several applications that DOES NOT require al fields to be filled out"

The fields should be set to null
Nicole
Posted: 08/13/2002, 12:24 AM

Anthony,
you should allow null values for the fields in table. If it is impossible you should assign default values to all the fields that are not-null.
To do it add them all the form and set their type to Hidden. Then enter default value into Default Value section.

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.