So first thing, in your
RBOleDb
class, your
DbType, DbDataSource, DbPath, and DbProvider
all lack a setter in the property so i'm not sure how your code even compiles so you'll need to change those from
public string DbType { get; }
to
public string DbType { get; set; }
.
Next thing I see, you indicate the problem class is
RBOleDb
but your usage in your console app shows you using a different class called
RBDataOleDb
which i suspect is your issue.
I ran your code and it works as is, after I made the previously mentioned compile errors fixes, so I think you've mixed up which class you intended to use in your console app.
This usage
string mdb = @"D:\FIRECOMM\Ricks Dallas D Drive\db\COUNTY DATA\statecounty00.MDB";
RBOleDb db = new RBOleDb(mdb);
Console.WriteLine ( db.DbType );
Console.WriteLine ( db.DbPath );
Console.WriteLine ( db.DbProvider );
Console.WriteLine("Result:" + db.GetProvider());
With the mentioned fixes in RBOleDb produce the following output
MDB
D:\FIRECOMM\Ricks Dallas D Drive\db\COUNTY DATA\statecounty00.MDB
Result:Microsoft.ACE.OLEDB.12.0