How can we help you today?
Entity Framework SaveChanges reports Connection must be opened error Print
Modified on: Sat, Jul 26, 2014 at 3:05 PM
Symptoms
When calling DbContext.SaveChanges() you receive the error message
Error 1012 (Provider v. 5.0.3.1237): Connection must be opened \r\nLine #: 0; Column #: 0
Cause
The Entity Framework provider for VistaDB has generated an invalid SQL statement in EF 6 when querying rows added to tables that use an autogenerated primary key (e.g. @@Identity)
Resolution
This was fixed in the VistaDB Provider for Entity Framework 6 version 5.0.3.1260. Update from NuGet to be sure you're using this version or later.
Did you find it helpful? Yes No
Send feedbackSorry we couldn't be helpful. Help us improve this article with your feedback.