GetAppliedMigrations() throws OleDBException
See original GitHub issueI am currently playing around with this provider and recently updgraded from the 2.2.X release to the recently merged 3.1. Until the merge I could use “MyContext.Database.GetAppliedMigrations()” successfully. Now the call raises :
System.Data.OleDb.OleDbException: 'Invalid SQL statement; expected ‘DELETE’, ‘INSERT’, ‘PROCEDURE’, ‘SELECT’, or ‘UPDATE’.
I am using the following configuration for my context:
JetConfiguration.ShowSqlStatements = true;
JetConfiguration.DUAL = JetConfiguration.DUALForMdb;
JetConfiguration.UseConnectionPooling = false;
JetConfiguration.DefaultDataAccessProviderType = DataAccessProviderType.OleDb;
var lconnectionString ="Provider=Microsoft.Jet.OLEDB.4.0;Jet OLEDB:Engine Type=5;User ID=Admin; Data Source=\"<somevalidpath>\";Mode=Share Deny None;Jet OLEDB:Database Password=\"<somevalidpassword>\";";
optionsBuilder.UseJet(lconnectionString, OleDBFactory.Instance);
I tried some variations of this configuration:
- With and without
OleDBFactory.Instance
- With and without
JetConfiguration.DefaultDataAccessProviderType = DataAccessProviderType.OleDb;
Have I missed some obvious change in the framework or is this an bug?
UPDATE: I forgot to mention that I am using MDB files.
Issue Analytics
- State:
- Created 3 years ago
- Comments:12 (4 by maintainers)
Top Results From Across the Web
oledb - C# oledbexception
I keep getting a exception of type OleDbException . ... The line with ** is what throws the exception. ... ExecuteReader() line?
Read more >OleDbException Class (System.Data.OleDb)
The exception that is thrown when the underlying provider returns a warning or error for an OLE DB data source. This class cannot...
Read more >RelationalDatabaseFacadeExten...
Gets all migrations that have been applied to the target database.
Read more >Version 3.1.8 GetAppliedMigrations & ...
System.NullReferenceException: 'Object reference not set to an instance of an object.' EF Core version: 3.1.8 Database provider: Devart.Data.
Read more >Remove migration does not remove unapplied ...
The following error is thrown when attempting to remove an unapplied migration: ... GetAppliedMigrations() call will check the history table in the ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
My Code:
The full stacktrace: ( I obfuscated some project names but the rest is unchanged)
@xoniuqe I moved it to #71.