Linking ODBC recordset with dialog fields

S

Simon Bailey

In VC++6 I used to use the add member variable tab of the class wizard to
bind recordset fields with dialog controls simply by specifying the m_pSet->
variable before the variable name. This all appears to have changed in VC
..NET.

I have a dialog - IDD_DATABASE_FORM with an edit box IDC_PRODUCTID. I wish
to bind this control through the view class CDatabaseView to the ODBC
recordset CDBProductSet. I notice that there is a function defined for
DoDataExchange. This has various comments about DDX_Field* functions. Does
a wizard still exist to generate these functions for me or do I now have to
add them manually? If the wizard no longer exists this surely is a backwrds
step???

TIA

Simon
 
A

Antti Keskinen

Hello !

See "Record Field Exchange" in MSDN. Essentially, you bind a database field
into a recordset object's member variable with RFX, then use OO to transfer
the data from the member variable to the dialog class, and DDX to transfer
data from the dialog class into the actual dialog.

-Antti Keskinen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top