Linking ODBC recordset with dialog fields

  • Thread starter Thread starter Simon Bailey
  • Start date Start date
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
 
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
 
Back
Top