Hi All,
I'm new to DB programming. I have an AddRecord() method in my GuestListSet class. I am following someone elses code.
QUESTION: What is the purpose of m_strFilter and m_strSort when adding information into a DB?
Here is the AddRecord() method
int CGuestSet::AddRecord(LPCTSTR Text1, LPCTSTR Text2)
{
// Locate new unique ID
if( IsOpen() )
Close();
m_strSort="MyID DESC";
m_strFilter.Empty();
Open();
int NewID;
if( IsEOF() )
NewID = 1;
else
NewID = m_GuestID + 1;
// Place record in AddNew mode
AddNew();
// Populate members
m_GuestID = NewID;
m_FirstName = Text1;
m_LastName = Text2;
// Update
Update();
return( TRUE );
}
MPSoutine
I'm new to DB programming. I have an AddRecord() method in my GuestListSet class. I am following someone elses code.
QUESTION: What is the purpose of m_strFilter and m_strSort when adding information into a DB?
Here is the AddRecord() method
int CGuestSet::AddRecord(LPCTSTR Text1, LPCTSTR Text2)
{
// Locate new unique ID
if( IsOpen() )
Close();
m_strSort="MyID DESC";
m_strFilter.Empty();
Open();
int NewID;
if( IsEOF() )
NewID = 1;
else
NewID = m_GuestID + 1;
// Place record in AddNew mode
AddNew();
// Populate members
m_GuestID = NewID;
m_FirstName = Text1;
m_LastName = Text2;
// Update
Update();
return( TRUE );
}
MPSoutine