Click here to Skip to main content
15,914,444 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Where can I find MEPG4 encode/decode samples? Pin
George216-Nov-02 3:06
George216-Nov-02 3:06 
GeneralCreating Waitable Timers Pin
Anonymous15-Nov-02 18:37
Anonymous15-Nov-02 18:37 
GeneralRe: Creating Waitable Timers Pin
ian mariano15-Nov-02 19:39
ian mariano15-Nov-02 19:39 
GeneralRe: Creating Waitable Timers Pin
Daniel Turini15-Nov-02 21:36
Daniel Turini15-Nov-02 21:36 
Generaladd another toolbar Pin
Anonymous15-Nov-02 16:37
Anonymous15-Nov-02 16:37 
QuestionHow to know when a process ends? Pin
IGx8915-Nov-02 15:41
IGx8915-Nov-02 15:41 
AnswerRe: How to know when a process ends? Pin
Michael Dunn15-Nov-02 16:13
sitebuilderMichael Dunn15-Nov-02 16:13 
Generaldatabase delete Pin
Shotgun15-Nov-02 15:37
Shotgun15-Nov-02 15:37 
in a reminder app i'm playin with i can't delete from the database and i don't understand. if i un comment the lines (test to read)
I get the required info, which means to me i'm on a recordset, but when i call delete it errors with no current recordset, what am i doing wrong?

BOOL CPageThree::DeleteRemind(CString sec, CString name)
{
CDaoDatabase datab;
CString SqlString;
int iRec = 0;

TRY
{

// Open the database
datab.Open("remind.mdb");

// Allocate the recordset
CDaoRecordset recset( &datab );

// Build the SQL statement
SqlString = "SELECT * "
"FROM Remind WHERE Catagory='";

SqlString += sec;
SqlString += "' AND Extra1='";
SqlString += name;
SqlString += "'";

// Execute it
recset.Open(dbOpenDynaset, SqlString, dbAppendOnly);

// make sure we can make changes and update
if (!recset.CanAppend() || !recset.CanUpdate( ))
AfxMessageBox("can't append from recordset");

// test to read from current recordset
// CString sWarnDate;
// recset.GetFieldValue("WarnDate",sWarnDate);

// delete the current record
recset.Delete();

// Close the database
datab.Close();
}
CATCH(CDBException, e)
{
// If a database exception occured, show error msg
AfxMessageBox("Database error: "+e->m_strError);
return FALSE;
}
END_CATCH;

GetDlgItem(IDC_BUT_DEL)->EnableWindow(FALSE);

InitTree();

return TRUE;

}
p.s am a beginner so be kind Confused | :confused:

shotgun
GeneralRe: database delete Pin
Shotgun15-Nov-02 16:05
Shotgun15-Nov-02 16:05 
GeneralCombo box control Pin
kati4215-Nov-02 15:28
kati4215-Nov-02 15:28 
GeneralMFC CFontDialog - adding Tooltips, changing Sample Text & Resizing. Pin
gjr15-Nov-02 13:39
gjr15-Nov-02 13:39 
GeneralClosest Pair problem Pin
cutama15-Nov-02 12:58
cutama15-Nov-02 12:58 
GeneralRe: Closest Pair problem Pin
ian mariano15-Nov-02 19:50
ian mariano15-Nov-02 19:50 
GeneralSysFreeAlloc and COM Pin
devvvy15-Nov-02 12:11
devvvy15-Nov-02 12:11 
GeneralRe: SysFreeAlloc and COM Pin
Paul M Watt15-Nov-02 12:18
mentorPaul M Watt15-Nov-02 12:18 
GeneralRe: SysFreeAlloc and COM Pin
devvvy15-Nov-02 12:24
devvvy15-Nov-02 12:24 
GeneralRe: SysFreeAlloc and COM Pin
Paul M Watt15-Nov-02 12:31
mentorPaul M Watt15-Nov-02 12:31 
GeneralRe: SysFreeAlloc and COM Pin
Michael Dunn15-Nov-02 16:16
sitebuilderMichael Dunn15-Nov-02 16:16 
GeneralRe: SysFreeAlloc and COM Pin
devvvy15-Nov-02 16:53
devvvy15-Nov-02 16:53 
GeneralRe: SysFreeAlloc and COM Pin
Michael Dunn15-Nov-02 21:03
sitebuilderMichael Dunn15-Nov-02 21:03 
GeneralSerializing question Pin
Shay Harel15-Nov-02 10:25
Shay Harel15-Nov-02 10:25 
GeneralRe: Serializing question Pin
Christian Graus15-Nov-02 10:33
protectorChristian Graus15-Nov-02 10:33 
GeneralRe: Serializing question Pin
Shay Harel15-Nov-02 10:37
Shay Harel15-Nov-02 10:37 
GeneralRe: Serializing question Pin
Christian Graus15-Nov-02 10:44
protectorChristian Graus15-Nov-02 10:44 
GeneralRe: Serializing question Pin
Ravi Bhavnani15-Nov-02 10:57
professionalRavi Bhavnani15-Nov-02 10:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.