DAO in C# Express
I am just starting to learn c# (I am from vb.net background) but I am having problems using DAO OpenDatabase and OpenRecordset when using c# express. I am not sure if this is related to database limitation of c# express. I have the following code in c# (which I converted from vb.net):
DAO._DBEngine dbEng = new DAO.DBEngineClass();
DAO.Workspace ws = dbEng.CreateWorkspace("", "admin", "", DAO.WorkspaceTypeEnum.dbUseJet­
;
DAO.Database db = ws.OpenDatabase(DBFileName, false, false, "");
DAO.Recordset rs;
rs = db.OpenRecordset("select * from Folder where FolderNo=0", "", "" ,"");
But I get the error "Operation is not supported for this type of object" at the OpenRecordset line. VB.net only have one mandatory parameter for OpenDatabase and OpenRecordset whereas c# has four mandatory parameters and the help files don't seem to give any indication on what those parameters should be.
My questions are:
1. Is the error a result of the database limitations of c#?
2. If c# can access the jet database via DAO, what parameters should be used? VB.net have optional parameters whereas putting null and "" in c# don't seem to help in the above OpenDatabase and OpenRecordset methods.

