Skip to content
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

Can't run SQL against MS Access (unable to obtain a DbFactory) #58

Closed
asherber opened this issue May 14, 2021 · 8 comments · Fixed by #82
Closed

Can't run SQL against MS Access (unable to obtain a DbFactory) #58

asherber opened this issue May 14, 2021 · 8 comments · Fixed by #82
Assignees
Milestone

Comments

@asherber
Copy link

I posted this on the LinqPad forum as well, because I'm not sure if it's a limitation of LinqPad or an issue with this driver.

When I make a connection to an MS Access db (either OleDb or ODBC), I'm able to test the connection successfully, I'm able to expand the connection node and see all the tables, and I'm able to run C# code using the connection. But if I choose SQL as the language and try to execute a straight query, I get an error, "Unable to obtain a DbFactory for the connection."

@MaceWindu MaceWindu added the bug label May 15, 2021
@MaceWindu
Copy link
Contributor

Confirmed. Works with LP5.

For .net core builds we don't support DbFactory, so it could be causing issue. Still not sure why it even tries to use DbFactory in first place...

@MaceWindu MaceWindu added this to the 3.4.0 milestone May 15, 2021
@MaceWindu MaceWindu added external and removed bug labels Nov 21, 2021
@MaceWindu MaceWindu removed this from the 3.6.0 milestone Nov 21, 2021
@MaceWindu
Copy link
Contributor

Currently it works with recent linqpad 5, 6, 7. Looks like linqpad issue indeed.

@asherber
Copy link
Author

@MaceWindu LP added a workaround after the issue was confirmed here (see forum post). I suspect the root cause may still be in linq2db.

@MaceWindu
Copy link
Contributor

Ok, will look into it once more

@MaceWindu MaceWindu reopened this Nov 21, 2021
@MaceWindu MaceWindu added this to the 3.6.0 milestone Nov 21, 2021
@MaceWindu
Copy link
Contributor

Hmm, but now I cannot reproduce it as linqpad site doesn't host old releases...

@MaceWindu
Copy link
Contributor

nevemind. chocolatey has older releases

@MaceWindu MaceWindu removed this from the 3.6.0 milestone Nov 21, 2021
@MaceWindu
Copy link
Contributor

Not actionable. I have no linqpad 6.13 anymore and linqpad site doesn't host older releases

@MaceWindu MaceWindu reopened this Nov 21, 2021
@MaceWindu
Copy link
Contributor

Ok, figured out what could be wrong. We don't implement GetProviderFactory, and linqpad driver dev. guide states:

You must override GetProviderFactory if you want SQL querying support, because DbProviderFactories.GetFactory returns nothing in .NET Core 3.1+.

@MaceWindu MaceWindu added this to the vNext milestone Nov 21, 2021
@MaceWindu MaceWindu self-assigned this Nov 21, 2021
@MaceWindu MaceWindu modified the milestones: vNext, 4.0.0 Jun 4, 2022
@viceroypenguin viceroypenguin modified the milestones: 4.0.0, vNext Jun 6, 2022
@MaceWindu MaceWindu modified the milestones: 4.2.0, 5.0.0 Sep 6, 2022
MaceWindu added a commit that referenced this issue Apr 22, 2023
* - initial project refactoring

- migration to scaffold framework

* move non-code files from project folder

* ifdefs refactoring

* code refactoring/cleanup (in progress)

* refactoring

* refactor settings UI

* update dependencies, fix build

* convert settings control tabs to usercontrol

* fix configuration dialogs styling

* implement #58, fixes, Access testing done

* sqlite tested

* - packages support

- custom types rendering
- firebird fixes

* sqlce (v5) fixes, v7 is not ready yet

* sqlce v7 fixes

* - sybase support

- fixes
- remove strong name

* clickhouse support

* sql server support (partially)

* sql server support

* postgresql linqpad 5 fix

* npgsql types rendering

* mysql/mariadb support

* oracle support

* sap hana support

* db2/informix support

* cleanup

* pre-built context support

* update dependencies

* code cleanup

* finalize release notes

* Update Build/README.md

Co-authored-by: Stuart Turner <stuart@turner-isageek.com>

* Update README.md

Co-authored-by: Stuart Turner <stuart@turner-isageek.com>

* Update release-notes.md

Co-authored-by: Stuart Turner <stuart@turner-isageek.com>

* add clickhouse provider information to UI

* [clickhouse] add FixedString to string mapping option

* add polysharp

* sql logger: don't log RecordsAffected when it is not set

* Database -> Database Type

* dialect detection for sql server, oracle, pgsql

---------

Co-authored-by: Stuart Turner <stuart@turner-isageek.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

3 participants