© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
32 replies
Bulelani Botman

I Keep On Getting An SQLException When Trying To Update My Database

I keep on getting an "SqlException: Cannot insert explicit value for identity column in table 'Loans' when IDENTITY_INSERT is set to OFF" even though I am not expliitlyl inserting a value on a identity column on the table. What I am using is using the ID from another table called Applicants & updating a column in Loans called ApplicantID with the ID from this table, I don't get this error.

I am using ASP.NET Core MVC, I just got an internship & the company uses this framework & I've been trying to learn it on my own because this is the first time ever in my life touching C#. Please upgrade the appsettings.json to your configuration if you intend to download the solution and figure out what is wrong. I am also willing to explain every question about a function or class because I didn't document the code. Also I didn't push the migrations to the github page.

https://github.com/inalelub/homeloan
GitHub
GitHub - inalelub/homeloan
Contribute to inalelub/homeloan development by creating an account on GitHub.
GitHub - inalelub/homeloan
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

✅ Keep getting this error when trying to do "Update-Database":
C#CC# / help
3y ago
Null object reference when trying to update an instance
C#CC# / help
2y ago
error when Update-Database
C#CC# / help
2y ago
✅ I'm trying load a .json file in my app but keep getting an error
C#CC# / help
3mo ago