devxlogo

Error When Performing Inserts on SQL Server

Error When Performing Inserts on SQL Server

Question:
When inserting data into a table that has an identity column that is also the key, the following error occurs: Non-Blob column in table is required to perform operation. I have tried to set break points to see what is happening, but I haven’t been able to find a point in the code where it breaks. The same code worked on this table before there was an ID column that was the identity column and the key.

Answer:
If you’re working with a SQL Server table, then you’re going to have that problem. We experienced that same problem when performing inserts on tables that have identity columns. Your best bet is to remove the identity flag from your table. There’s a way to do this in SQL Server, but I’m not sure how. Barring that, you’d best put a SELECT INTO into a new table then re-key it.

See also  Small Business Strategies with Venmo
devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist