greenbird
asked on
TO: Inpras ( in viewing ur reply)
Hi, Inpras,
pls read my new post in the original qn.
thanks a lot!
pls read my new post in the original qn.
thanks a lot!
ASKER
Edited text of question.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi, Inpras,
still got error . :(
the code:
// this version did not use the database support, rite?
CDatabase db;
db.Open("mydata", FALSE, FALSE, "ODBC;", TRUE );
CRecordset rs(&db);
db.ExecuteSQL("ALTER TABLE BU3_94 ADD Field3 CHAR(10));
while(!(rs.IsEOF())) {
if((strcmp(rs.HCATR,"N")== 0))
&&(strcmp(m_pSet->m_HCATL, "N")==0))
{
rs.Edit();
rs.Field3 = "N";
rs.HCATR = "";
rs.HCATL = strdup("");
rs.Update();
}
the error is "HCAT_L HCAT_R Field3" are not members of CRecordset.
how?
thanks a lot!
still got error . :(
the code:
// this version did not use the database support, rite?
CDatabase db;
db.Open("mydata", FALSE, FALSE, "ODBC;", TRUE );
CRecordset rs(&db);
db.ExecuteSQL("ALTER TABLE BU3_94 ADD Field3 CHAR(10));
while(!(rs.IsEOF())) {
if((strcmp(rs.HCATR,"N")==
&&(strcmp(m_pSet->m_HCATL,
{
rs.Edit();
rs.Field3 = "N";
rs.HCATR = "";
rs.HCATL = strdup("");
rs.Update();
}
the error is "HCAT_L HCAT_R Field3" are not members of CRecordset.
how?
thanks a lot!
give me UR email ID I will send U my work space
Once U create table's new col open it again
db.ExecuteSQL("ALTER TABLE BU3_94 ADD Field3 CHAR(10));
CRecordset rs(&db);
rs.Open(...);
db.ExecuteSQL("ALTER TABLE BU3_94 ADD Field3 CHAR(10));
CRecordset rs(&db);
rs.Open(...);
ASKER
Hi,
the problem now is that i do not know why it always says
m_HCATR m_HCATL ets is not a member. i have the following classes already:
class CSectionSet : public CRecordset
{
public:
CSectionSet(CDatabase* pDatabase = NULL);
DECLARE_DYNAMIC(CSectionSe t)
CSectionSet::~CSectionSet( );
// Field/Param Data
//{{AFX_FIELD(CSectionSet, CRecordset)
CString m_NRIC;
CString m_RACE;
CString m_CLIN;
CString m_SEX;
CTime m_DOB;
CTime m_DOS;
CString m_CTYP;
CString m_CSRC;
double m_HDUR;
CString m_HHYP;
CString m_HCATR;
CString m_HCATL;
CString m_HVAUR;
CString m_HVAUL;
CString m_HVAPR;
CString m_HVAPL;
double m_HDIOR;
double m_HDIOL;
CString m_FCATR;
CString m_FCATL;
CString m_FCUPR;
CString m_FCUPL;
CString m_FNOUR;
CString m_FNOUL;
CString m_FMACR;
CString m_FMACL;
CString m_FDIAR;
CString m_FDIAL;
CString m_FLASR;
CString m_FLASL;
CString m_FFFSR;
CString m_FFFSL;
CString m_FPOSR;
CString m_FPOSL;
CString m_FCRER;
CString m_FCREL;
CString m_FSRNR;
CString m_FSRNL;
CString m_FGEOR;
CString m_FGEOL;
CString m_FDRUR;
CString m_FDRUL;
CString m_FHYPR;
CString m_FHYPL;
CString m_FMYER;
CString m_FMYEL;
CString m_FBRVR;
CString m_FBRVL;
CString m_FCRVR;
CString m_FCRVL;
CString m_FRPER;
CString m_FRPEL;
CString m_FASTR;
CString m_FASTL;
CString m_FOTHR;
CString m_FOTHL;
CString m_REBY;
CString m_RETO;
CString m_RETY;
CString m_REDR;
//}}AFX_FIELD
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CSectionSe t)
public:
virtual CString GetDefaultConnect();
// Default connection string
virtual CString GetDefaultSQL();
// default SQL for Recordset
virtual void DoFieldExchange(CFieldExch ange* pFX); // RFX support
//}}AFX_VIRTUAL
// Implementation
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
};
it seems that rs is not connected to the above class????
thanks a lot!
the problem now is that i do not know why it always says
m_HCATR m_HCATL ets is not a member. i have the following classes already:
class CSectionSet : public CRecordset
{
public:
CSectionSet(CDatabase* pDatabase = NULL);
DECLARE_DYNAMIC(CSectionSe
CSectionSet::~CSectionSet(
// Field/Param Data
//{{AFX_FIELD(CSectionSet,
CString m_NRIC;
CString m_RACE;
CString m_CLIN;
CString m_SEX;
CTime m_DOB;
CTime m_DOS;
CString m_CTYP;
CString m_CSRC;
double m_HDUR;
CString m_HHYP;
CString m_HCATR;
CString m_HCATL;
CString m_HVAUR;
CString m_HVAUL;
CString m_HVAPR;
CString m_HVAPL;
double m_HDIOR;
double m_HDIOL;
CString m_FCATR;
CString m_FCATL;
CString m_FCUPR;
CString m_FCUPL;
CString m_FNOUR;
CString m_FNOUL;
CString m_FMACR;
CString m_FMACL;
CString m_FDIAR;
CString m_FDIAL;
CString m_FLASR;
CString m_FLASL;
CString m_FFFSR;
CString m_FFFSL;
CString m_FPOSR;
CString m_FPOSL;
CString m_FCRER;
CString m_FCREL;
CString m_FSRNR;
CString m_FSRNL;
CString m_FGEOR;
CString m_FGEOL;
CString m_FDRUR;
CString m_FDRUL;
CString m_FHYPR;
CString m_FHYPL;
CString m_FMYER;
CString m_FMYEL;
CString m_FBRVR;
CString m_FBRVL;
CString m_FCRVR;
CString m_FCRVL;
CString m_FRPER;
CString m_FRPEL;
CString m_FASTR;
CString m_FASTL;
CString m_FOTHR;
CString m_FOTHL;
CString m_REBY;
CString m_RETO;
CString m_RETY;
CString m_REDR;
//}}AFX_FIELD
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CSectionSe
public:
virtual CString GetDefaultConnect();
// Default connection string
virtual CString GetDefaultSQL();
// default SQL for Recordset
virtual void DoFieldExchange(CFieldExch
//}}AFX_VIRTUAL
// Implementation
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
};
it seems that rs is not connected to the above class????
thanks a lot!
Oops this means U have done UR project as with database support U should use
CSectionSet rs; to open
even after this also U get error then go to class wizard and choose update fields so that UR recodset rebinfds to UR table I seriously doubt U have those
m_HCATR m_HCATL equivalent fields in UR databse there is always a one to one relation between UR databse fields and UR recordset derived class check whether it is there.
Where is UR email id so that I can send the sample work space for U?
CSectionSet rs; to open
even after this also U get error then go to class wizard and choose update fields so that UR recodset rebinfds to UR table I seriously doubt U have those
m_HCATR m_HCATL equivalent fields in UR databse there is always a one to one relation between UR databse fields and UR recordset derived class check whether it is there.
Where is UR email id so that I can send the sample work space for U?
ASKER
hi,
my email address is:
aibinbin@hotmail.com
my email address is:
aibinbin@hotmail.com
ASKER
Hi,Inpras
have u seen my email address? aibinbin@hotmail.com
well i wonder whether u have read my requirements for the program:
click a button on a FormView, then a dialog box is displayed.
in the dialog box, there is a clistbox and a button.
let user select which fields to combine in the clistbox.click the button on the dialog box, then update the database in the following way:
say the database have the following fields:
A1 A2 B1 B2 C1 C2
if (A1="Y" and A1 ="Y")
then delete A1 and A2
and insert A3 = "Y"
else
delete A1 and A2
and insert A3="N"
lets say the user select "combine A1 and A2" in the clistbox, then the database fianlly will be like:
A3 B1 B2 C1 C2
thank u very much again and waiting for ur email!
thanks!
have u seen my email address? aibinbin@hotmail.com
well i wonder whether u have read my requirements for the program:
click a button on a FormView, then a dialog box is displayed.
in the dialog box, there is a clistbox and a button.
let user select which fields to combine in the clistbox.click the button on the dialog box, then update the database in the following way:
say the database have the following fields:
A1 A2 B1 B2 C1 C2
if (A1="Y" and A1 ="Y")
then delete A1 and A2
and insert A3 = "Y"
else
delete A1 and A2
and insert A3="N"
lets say the user select "combine A1 and A2" in the clistbox, then the database fianlly will be like:
A3 B1 B2 C1 C2
thank u very much again and waiting for ur email!
thanks!
ASKER
Hi,Inpras
have u seen my email address? aibinbin@hotmail.com
well i wonder whether u have read my requirements for the program:
click a button on a FormView, then a dialog box is displayed.
in the dialog box, there is a clistbox and a button.
let user select which fields to combine in the clistbox.click the button on the dialog box, then update the database in the following way:
say the database have the following fields:
A1 A2 B1 B2 C1 C2
if (A1="Y" and A1 ="Y")
then delete A1 and A2
and insert A3 = "Y"
else
delete A1 and A2
and insert A3="N"
lets say the user select "combine A1 and A2" in the clistbox, then the database fianlly will be like:
A3 B1 B2 C1 C2
thank u very much again and waiting for ur email!
thanks!
have u seen my email address? aibinbin@hotmail.com
well i wonder whether u have read my requirements for the program:
click a button on a FormView, then a dialog box is displayed.
in the dialog box, there is a clistbox and a button.
let user select which fields to combine in the clistbox.click the button on the dialog box, then update the database in the following way:
say the database have the following fields:
A1 A2 B1 B2 C1 C2
if (A1="Y" and A1 ="Y")
then delete A1 and A2
and insert A3 = "Y"
else
delete A1 and A2
and insert A3="N"
lets say the user select "combine A1 and A2" in the clistbox, then the database fianlly will be like:
A3 B1 B2 C1 C2
thank u very much again and waiting for ur email!
thanks!
ASKER