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 ");