-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OleDbConnectionStringBuilder.TryGetValue() throws when scaffolding as x86 using a System.Data.OleDb version <= 4.7.1 #55
Comments
I completely reimplemented the schema retrieval and scaffolding code two weeks ago. I will push the PR today. |
@ChrisJollyAU The PR has now been merged into |
Tried with the latest bits. It's still freezing after No design-time services were found. If I end the dotnet task (no matter how long I wait after it gets to that point), the error is shown as follows
It appears to be in A quick hack in the constructor var dataSource = csb.GetDataSource();
var userId = "admin"; ;// csb.GetUserId();
var password = "";// csb.GetPassword();
var systemDatabase = "Jet OLEDB:System Database";// csb.GetSystemDatabase(); and it works fine after that. Not quite sure what is going on to make it do that |
What is the version of It might also help, if you can provide us with the database you are trying to scaffold. There are some bugs in You can also just try to switch to ODBC instead (or only for scaffolding, if you like), which has none of those issues. This should be as easy as using a connection string like If this turns out to be an issue that has not been fixed yet in the newer versions of Otherwise, we should probably check that the |
System.Data.OleDb: 4.7.1 |
@ChrisJollyAU You are running the command on a 32 bit system? |
64 bit. But the SDK, runtime, Jet driver and program are all set for 32 bit |
Alright, I am able to replicate this issue on a 32 bit Windows installation.
|
This is the underlying issue here. We are using the We could just not use the Looks like the PR by @FreddyD-GH (dotnet/runtime#33899) still hasn't made it into a public release. @saurabh500 @danmosemsft Shouldn't have this gone into a servicing release months ago? (From dotnet/runtime#33899 (comment))
@FreddyD-GH already asked about this on April 15:
|
@ChrisJollyAU If you want to use OLE DB as the data access method, make sure to use one of the preview releases of Otherwise, use ODBC, which seems to be much more stable than OLE DB when accessed by .NET and when accessing a Jet database, due to a variety of bugs between |
It's only having a problem with User Id, Password and possibly System Database Workaround 1: Specify a non-empty value in the connection string If you just specify If you add
So it is getting passed all of them in the end |
Workaround 2: Update the GetUserId function with the follwoing
Same thing with Password and System database and it works perfectly without specifying the values in the connection string |
@ChrisJollyAU See my comment from above for why we will not fix this issue:
The correct approach is to either use a current preview version of We should however make ODBC the default, so that anybody who just uses the file path as the connection string (which we support) and does not reference a fixed version of We will also publish two packages, |
|
Using the 3.1-preview branch I was trying to scaffold a ms access .mdb database.
Using the -verbose option the log would go to
Finding design-time services for provider 'EntityFrameworkCore.Jet'...
Using design-time services from provider 'EntityFrameworkCore.Jet'.
Finding design-time services referenced by assembly 'Assembly'.
No referenced design-time services were found.
Finding IDesignTimeServices implementations in assembly 'Assembly'...
No design-time services were found.
and sit there for however long (15 - 20 at least) until I ended the running process.
In the JetConnection file, if I remove the ExpandDatabaseFilePath call and just use connectionString for the parameter it goes past that point and I get the
Found table with name: .... ,
Found column with table: ....,
Found index for column: ...
for all the tables, columns and indexes
The text was updated successfully, but these errors were encountered: