dao.DBEngine DBE;
dao.Database DB;
dao.Recordset RS;
string DBPath;
DBPath = "C:\\Test\\test.mdb";
DBE = new dao.DBEngine();
DB = DBE.OpenDatabase(DBPath, false, false, "");
RS = DB.OpenRecordset("SELECT * FROM TEST", dao.RecordsetTypeEnum.dbOpenSnapshot, 0, dao.LockTypeEnum.dbOptimistic);
RS.MoveLast(0);
RS.MoveFirst();
String Val = RS.Fields("ColName");
最后一条指令适用于 VBA 或 VB.NET 我想,为什么它不适用于 C#?