System.Data.OleDB.Connection missing

Gentleman

New member
Joined
Jan 5, 2022
Messages
2
Programming Experience
Beginner
Dear community,


I use the VS2022 Community-Edition (17.0.4) with C# 10 and dotNet 6 on the latest Win11-Version with local M365-Office packages (all 64 bit).
I wrote a database-Access-class with the 4.7 framework under VS2019 It worked well.
Now I tried the same under the new envirionment and it does not work anymore. I am able to connect the Access-database in Visual Studio by using the Server-Explorer-function, but OleDb is unknown in the code, except OleDbPermission and OleDbPemissionAttrubute. I need a valid OleDbConnection-String like OleDBConnection con = new OleDbConnection(); but it is not listed.
The option "ImplicitsUsings" is set. I am just started a few month ago, programming with C# and have no idea, how to fix that . Youtube does not handle that problem yet. A new installation of VS2022 hadn't any effect.
Is there anybody who can help?

Best regards


Stephan Volquards
005012.jpg
 

JohnH

C# Forum Moderator
Staff member
Joined
Apr 23, 2011
Messages
1,362
Location
Norway
Programming Experience
10+
Add the Nuget package "System.Data.OleDb"
 

JohnH

C# Forum Moderator
Staff member
Joined
Apr 23, 2011
Messages
1,362
Location
Norway
Programming Experience
10+
Top Bottom