Click here to Skip to main content
15,893,487 members
Home / Discussions / Database
   

Database

 
GeneralRe: Get hirarchy query Pin
SatyaKeerthi1518-Aug-10 19:01
SatyaKeerthi1518-Aug-10 19:01 
QuestionGet hirarchy query Pin
SatyaKeerthi1518-Aug-10 19:02
SatyaKeerthi1518-Aug-10 19:02 
AnswerRe: Get hirarchy query Pin
ps_prakash0219-Aug-10 21:31
ps_prakash0219-Aug-10 21:31 
QuestionHow to query exclusion? SQL Help needed Pin
Kyudos16-Aug-10 17:36
Kyudos16-Aug-10 17:36 
AnswerRe: How to query exclusion? SQL Help needed Pin
Kyudos16-Aug-10 17:44
Kyudos16-Aug-10 17:44 
GeneralRe: How to query exclusion? SQL Help needed Pin
Mycroft Holmes16-Aug-10 18:22
professionalMycroft Holmes16-Aug-10 18:22 
GeneralRe: How to query exclusion? SQL Help needed Pin
Kyudos17-Aug-10 10:46
Kyudos17-Aug-10 10:46 
GeneralRe: How to query exclusion? SQL Help needed Pin
Kyudos17-Aug-10 13:18
Kyudos17-Aug-10 13:18 
Can you see anything wrong with this?

CDaoDatabase* pDB = static_cast<CMainFrame *>(AfxGetMainWnd())->GetDatabase();
CMyRecords Records(pDB);

CString sSQL = "SELECT * FROM Components LEFT JOIN Nozzles ON
Components.[Component Key] = Nozzles.[Nozzle Key] WHERE
(((Components.[Database Number])=15) AND ((Nozzles.[Nozzle Key]) Is Null))";
	
try
{
    Records.Open(dbOpenDynaset, sSQL, 0);

    if (Records.IsBOF() || Records.IsEOF())
    {
        return;
    }

    Records.MoveFirst();
    while (!Records.IsEOF())
    {
        if (Records.CanUpdate())
        {
            Records.Delete();
        }
        Records.MoveNext();
    }

    Records.Close();
}
catch(CDaoException *e)
{
    e->ReportError();
    e->Delete();
    if (Records.IsOpen())
    {
        Records.Close();
    }
}


I can see it gets the right records, it doesn't give anY errors or exceptions, but it also doesn't delete the records!

Must be missing something...
GeneralRe: How to query exclusion? SQL Help needed Pin
Mycroft Holmes17-Aug-10 13:31
professionalMycroft Holmes17-Aug-10 13:31 
GeneralRe: How to query exclusion? SQL Help needed Pin
Kyudos18-Aug-10 11:10
Kyudos18-Aug-10 11:10 
GeneralRe: How to query exclusion? SQL Help needed Pin
Kyudos17-Aug-10 13:30
Kyudos17-Aug-10 13:30 
QuestionSelect and Update Pin
T.RATHA KRISHNAN15-Aug-10 20:53
T.RATHA KRISHNAN15-Aug-10 20:53 
AnswerRe: Select and Update Pin
Luc Pattyn16-Aug-10 0:22
sitebuilderLuc Pattyn16-Aug-10 0:22 
Questionaccess database Pin
sharmakamal14-Aug-10 7:45
sharmakamal14-Aug-10 7:45 
AnswerRe: access database PinPopular
Luc Pattyn14-Aug-10 8:59
sitebuilderLuc Pattyn14-Aug-10 8:59 
GeneralRe: access database Pin
PIEBALDconsult14-Aug-10 15:19
mvePIEBALDconsult14-Aug-10 15:19 
GeneralRe: access database Pin
Luc Pattyn14-Aug-10 15:24
sitebuilderLuc Pattyn14-Aug-10 15:24 
GeneralRe: access database Pin
PIEBALDconsult14-Aug-10 16:13
mvePIEBALDconsult14-Aug-10 16:13 
GeneralRe: access database Pin
Corporal Agarn17-Aug-10 1:10
professionalCorporal Agarn17-Aug-10 1:10 
AnswerRe: access database Pin
Dr.Walt Fair, PE14-Aug-10 10:15
professionalDr.Walt Fair, PE14-Aug-10 10:15 
GeneralRe: access database Pin
Luc Pattyn14-Aug-10 10:44
sitebuilderLuc Pattyn14-Aug-10 10:44 
GeneralRe: access database Pin
Yusuf14-Aug-10 18:28
Yusuf14-Aug-10 18:28 
JokeRe: access database Pin
Dan Mos15-Aug-10 3:50
Dan Mos15-Aug-10 3:50 
AnswerRe: access database Pin
Mycroft Holmes14-Aug-10 12:45
professionalMycroft Holmes14-Aug-10 12:45 
JokeRe: access database Pin
Dan Mos15-Aug-10 2:40
Dan Mos15-Aug-10 2:40 

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.