| |

VerySource

 Forgot password?
 Register
Search
View: 708|Reply: 2

Using MFC ODBC to Operate Databases in Dialog-based Programs

[Copy link]

1

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-2-6 13:00:01
| Show all posts |Read mode
I created a new CRecordset class, then added a member variable of the CRecordset class to the Dlg class, added the CRecordset.h header file, and then I added a few CEdit classes to the dialog box, and the member variables are associated with the members in m_pSet Up, I found that something went wrong during the operation. It seems that the error is what dbview is, and the dialog box does not appear.

Statement stopped
void AFXAPI AfxAssertValidObject (const CObject * pOb,
LPCSTR lpszFileName, int nLine)
{
if (pOb == NULL)
{
TRACE0 ("ASSERT_VALID fails with NULL pointer.\n");
if (AfxAssertFailedLine (lpszFileName, nLine))
AfxDebugBreak ();
return; // quick escape
}
if (! AfxIsValidAddress (pOb, sizeof (CObject)))
{
TRACE0 ("ASSERT_VALID fails with illegal pointer.\n");
Stop position if (AfxAssertFailedLine (lpszFileName, nLine))
AfxDebugBreak ();
return; // quick escape
}

Is it a problem like this, people who know say
Reply

Use magic Report

0

Threads

55

Posts

32.00

Credits

Newbie

Rank: 1

Credits
32.00

 China

Post time: 2020-4-5 00:30:02
| Show all posts
In ODBC, the fields of the record set and the member variables of the class can be automatically bound.
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-8-24 13:15:01
| Show all posts
Supportrsq666
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list