The error "cannot be empty but cannot be null" is reported after login. sqlservernull

Source: Internet
Author: User

The error "cannot be empty but cannot be null" is reported after login. sqlservernull

The value of SQL server 2012 cannot be null. Parameter Name: viewinfo (microsoft. sqlserver. managemenmen)

It is because a directory named 2 is missing in C: \ Users \ your USERNAME \ AppData \ Local \ Temp. Add.


SQL syntax error: you cannot INSERT NULL values into the column ''. This column does not allow NULL values to be inserted. How can this problem be solved?

The syntax is correct, because the syntax does not verify whether the fields in the table structure are not empty. Only the execution is known.
During your stored procedure, null values must be inserted into non-empty fields.
This syntax is certainly not an error, but it is wrong when the validation data is inserted.
For example, you have a table tb_employee (employee_id, employee_name)
The first id field cannot be blank.
However: insert into tb_employee values (null, 'test null ')
This syntax is correct, but you cannot insert null values into columns that are not allowed to be empty. The actual insertion validation will fail.

When JSP enters the SQL SERVER database to add records, the webpage jumps and reports that the column 'studentcode' cannot be inserted with NULL values, table 'studentinfodb

String StudentCode = request. getParameter ("StdentCode ");
The parameter name is incorrect:
String StudentCode = request. getParameter ("StudentCode ");

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.