You cannot insert NULL values into the column & amp; #39; id & amp; #39;, Table & amp; #39; weibo.

Source: Internet
Author: User
The SQL Server database is used as a web project: the column id cannot be inserted with NULL values, and the weibo. dbo. myfriend Column cannot have NULL values. INSERT failed. Error message: com. microsoft. sqlserver. jdbc. SQLServerException: atcom. microsoft. sqlserver. jdbc. SQLServerException. makeFro

The SQL Server 2005 database is used for web projects: the column id cannot be inserted with NULL values, and the weibo. dbo. myfriend Column cannot have NULL values. INSERT failed. Error message: com. microsoft. sqlserver. jdbc. SQLServerException: at com. microsoft. sqlserver. jdbc. SQLServerException. makeFro

SQL Server 2005 databases are used for web projects: the 'id' Column cannot be inserted with NULL values, and the 'weibo. dbo. myfriend' Column cannot have NULL values. INSERT failed.

Error message:

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 $ prep;texeccmd. doExecute (Unknown Source)
At com.microsoft.sqlserver.jdbc.TDSCommand.exe cute (Unknown Source)
At com.microsoft.sqlserver.jdbc.SQLServerConnection.exe cuteCommand (Unknown Source)
At com.microsoft.sqlserver.jdbc.SQLServerStatement.exe cuteCommand (Unknown Source)
At com.microsoft.sqlserver.jdbc.SQLServerStatement.exe cuteStatement (Unknown Source)
At com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.exe cuteUpdate (Unknown Source)

Error cause:

Creating myfriend in SQL Server 2005 does not set the id to "yes"

Solution:

For example, set its Id to "yes"

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.