是否能在数据库中查询,更改后就直接返回一个类(即一条数据记录集),JAVA里提供了ActiveRecord的方法,VC里有相应的方法吗?在这里先多谢大家各位了

解决方案 »

  1.   

    我现在的写法是这样的
    我有个Customer的类,Customer* m_pCustomer 
    CString sql;
    sql.Format("select * from Customer where User_Account = '%s");
    然后再提取这条记录集的每个属性,对pCustomer赋值.
    itsCustomers.GetCollect("User_Account",cstrTemp);
    itsCustomers.GetCollect("User_Pass",cstePass);
    itsCustomers.GetCollect("User_Type",nType);
    itsCustomers.GetCollect("User_Rest",nRest);
    m_pCustomer = new Customer(cstrTemp.GetBuffer(),cstePass.GetBuffer(),nType,nRest);
    比如这句话我想通过一种方法提取这个类,而不是通过对这个类每个成员赋值的方法将它实例化,在VC里有这种方法吗