Click here to Skip to main content
16,010,553 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questiontoo simple to work? Pin
11-Mar-02 13:18
suss11-Mar-02 13:18 
AnswerRe: too simple to work? Pin
Joaquín M López Muñoz11-Mar-02 20:14
Joaquín M López Muñoz11-Mar-02 20:14 
GeneralRe: too simple to work? Pin
12-Mar-02 4:47
suss12-Mar-02 4:47 
GeneralRe: too simple to work? Pin
Atila12-Mar-02 5:25
Atila12-Mar-02 5:25 
GeneralRe: too simple to work? Pin
12-Mar-02 5:27
suss12-Mar-02 5:27 
GeneralRe: too simple to work? Pin
12-Mar-02 5:41
suss12-Mar-02 5:41 
GeneralRe: Hello again ! Pin
Atila12-Mar-02 5:57
Atila12-Mar-02 5:57 
GeneralUsing Property Pages to Display ODBC Database Pin
dsouthard11-Mar-02 12:39
dsouthard11-Mar-02 12:39 
I've been trying to return data from an ODBC database and display it in a tabbed dialog (property page). The code compiles just fine, but I get a runtime error during execution. Specifically,

ERROR MESSAGE:
<br />
TRACE0("ASSERT_VALID fails with NULL pointer.\n");<br />
        if (AfxAssertFailedLine(lpszFileName, nLine))<br />
            AfxDebugBreak();<br />
        return;     // quick escape<br />


I know the CRecordset class I created works fine (I've used it before in a single dialog page). The problem seems to occur during data exchange in the CPropertypage class. Here's the code that is suspect:

CPROPERTYPAGE SOURCE:
<br />
CPersonalData::CPersonalData() : CPropertyPage(CPersonalData::IDD)<br />
{<br />
    //{{AFX_DATA_INIT(CPersonalData)<br />
    m_pSet = NULL;<br />
    //}}AFX_DATA_INIT<br />
}<br />
<br />
void CPersonalData::DoDataExchange(CDataExchange* pDX)<br />
{<br />
    CPropertyPage::DoDataExchange(pDX);<br />
    //{{AFX_DATA_MAP(CPersonalData)<br />
    DDX_FieldText(pDX, IDC_TITLE, m_pSet->m_TITLE, m_pSet);<br />
    //}}AFX_DATA_MAP<br />
}<br />
<br />
CRecordset* CPersonalData::OnGetRecordset()<br />
{<br />
    return m_pSet;<br />
}<br />


In addition, m_pSet is defined in the header file for the CPropertypage as follows:

CPROPERTYPAGE HEADER:
<br />
class CPhysiciansListSet;<br />
<br />
class CPersonalData : public CPropertyPage<br />
{<br />
    DECLARE_DYNCREATE(CPersonalData)<br />
<br />
// Construction<br />
public:<br />
    CPersonalData();<br />
    ~CPersonalData();<br />
<br />
    virtual BOOL PreTranslateMessage (MSG* pMsg);<br />
<br />
// Dialog Data<br />
    //{{AFX_DATA(CPersonalData)<br />
    enum { IDD = IDD_PERSONALDATA };<br />
    CPhysiciansListSet* m_pSet;<br />
    //}}AFX_DATA<br />
};<br />


Any suggestions would be GREATLY appreciated. I've been screwing around with this app for a week now on this one problem and I'm about to go crazy.

Thanks in advance.
GeneralCHtmlView question Pin
Chris Losinger11-Mar-02 12:22
professionalChris Losinger11-Mar-02 12:22 
GeneralAfxGetMainWnd() from a Worker Thread Pin
Giles11-Mar-02 11:03
Giles11-Mar-02 11:03 
GeneralRe: AfxGetMainWnd() from a Worker Thread Pin
Morozov Alexey11-Mar-02 12:20
Morozov Alexey11-Mar-02 12:20 
GeneralRe: AfxGetMainWnd() from a Worker Thread Pin
Giles12-Mar-02 12:29
Giles12-Mar-02 12:29 
GeneralRe: AfxGetMainWnd() from a Worker Thread Pin
Nish Nishant11-Mar-02 14:04
sitebuilderNish Nishant11-Mar-02 14:04 
GeneralRe: AfxGetMainWnd() from a Worker Thread Pin
Giles12-Mar-02 12:26
Giles12-Mar-02 12:26 
GeneralCObArray - Destructors for CObject Pin
dazinith11-Mar-02 10:36
dazinith11-Mar-02 10:36 
GeneralODBC and ExecuteSQL Pin
Yousuf11-Mar-02 10:04
Yousuf11-Mar-02 10:04 
GeneralRe: ODBC and ExecuteSQL Pin
Carlos Antollini11-Mar-02 10:46
Carlos Antollini11-Mar-02 10:46 
GeneralRe: ODBC and ExecuteSQL Pin
Yousuf12-Mar-02 9:21
Yousuf12-Mar-02 9:21 
GeneralWhich software updates NT to MSVCRT.DLL (6.00.8797) Pin
Hoang Le11-Mar-02 9:05
Hoang Le11-Mar-02 9:05 
GeneralRe: Which software updates NT to MSVCRT.DLL (6.00.8797) Pin
Derek Waters11-Mar-02 11:28
Derek Waters11-Mar-02 11:28 
GeneralTransparency and IPicture Pin
Derek Lakin11-Mar-02 8:46
Derek Lakin11-Mar-02 8:46 
GeneralSIMPLE QUESTION Pin
11-Mar-02 8:20
suss11-Mar-02 8:20 
GeneralRe: SIMPLE QUESTION Pin
Christian Graus11-Mar-02 8:23
protectorChristian Graus11-Mar-02 8:23 
GeneralRe: SIMPLE QUESTION Pin
Mazdak11-Mar-02 9:14
Mazdak11-Mar-02 9:14 
GeneralEdit Boxes\ Rich Edit Pin
11-Mar-02 8:18
suss11-Mar-02 8:18 

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.