interface IDAL{
public void Insert();
public void Delete();
}
class SQLHelper implements IDAL{
}
怎样实现兼容性:
实现接口对象
把不同的数据库连接对象分别赋给实现的接口对象
DAL dal = new DAL();
dal = new MySQLHelper();
dal.Insert(pm);
public void Insert();
public void Delete();
}
class SQLHelper implements IDAL{
}
怎样实现兼容性:
实现接口对象
把不同的数据库连接对象分别赋给实现的接口对象
DAL dal = new DAL();
dal = new MySQLHelper();
dal.Insert(pm);