Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CRecordset/m_strFilter/m_strSort

Status
Not open for further replies.

mpsoutine

Programmer
Jan 6, 2003
87
US
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
 
>> when adding information into a DB?

Not, they are being used to filter and order the rows in the Open() function.

-pete

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top