A project that uses a SQL Server 2005 database to do the Web appears: Cannot insert value NULL into column ' id ', table ' weibo.dbo.myfriend '; column does not allow null values. INSERT failed.
Error Tip:
Com.microsoft.sqlserver.jdbc.SQLServerException:
At Com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError (Unknown Source)
At Com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult (Unknown Source)
At Com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement (Unknown Source)
At Com.microsoft.sqlserver.jdbc.sqlserverpreparedstatement$prepstmtexeccmd.doexecute (Unknown Source)
At Com.microsoft.sqlserver.jdbc.TDSCommand.execute (Unknown Source)
At Com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand (Unknown Source)
At Com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand (Unknown Source)
At Com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement (Unknown Source)
At Com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeUpdate (Unknown Source)
Error Reason:
Setting up myfriend in SQL Server 2005 does not set the ID mark to Yes
Solution:
The following figure sets its ID to Yes