Microsoft KB Archive/167423: Difference between revisions

From BetaArchive Wiki
m (Text replacement - ">" to ">")
m (Text replacement - """ to """)
 
Line 12: Line 12:
<div id="TitleRow">
<div id="TitleRow">


= <span id="KB167423"></span>FIX: CRecordset Members Not in &quot;Add Member Variable&quot; Dialog Box =
= <span id="KB167423"></span>FIX: CRecordset Members Not in "Add Member Variable" Dialog Box =




Line 45: Line 45:
== SYMPTOMS ==
== SYMPTOMS ==


This problem only occurs in the German localized version of Visual C++ 5.0. When you have Ctrl+DblClk on a dialog box or &quot;Add Member Variable&quot; in Class Wizard, the member variables in the CRecordset class are not displayed.
This problem only occurs in the German localized version of Visual C++ 5.0. When you have Ctrl+DblClk on a dialog box or "Add Member Variable" in Class Wizard, the member variables in the CRecordset class are not displayed.


</div>
</div>
Line 80: Line 80:
<br />
<br />


## Click &quot;Datenbankansicht mit Dateiunterstunterstutzung&quot; (Database view with file support).
## Click "Datenbankansicht mit Dateiunterstunterstutzung" (Database view with file support).
## Click Datanquelle... (DataSource...).
## Click Datanquelle... (DataSource...).
## In the &quot;Datenbankoptionen&quot; (Database Options) dialog box, connect to an ODBC or DAO database. Select a table from the database.
## In the "Datenbankoptionen" (Database Options) dialog box, connect to an ODBC or DAO database. Select a table from the database.
# In MFC AppWizard - step 2 of 6 - Click &quot;Fertigstellen&quot; (Finish).
# In MFC AppWizard - step 2 of 6 - Click "Fertigstellen" (Finish).
# Click the ResourceView for the project and open the dialog resource for IDD_TEST_FORM.
# Click the ResourceView for the project and open the dialog resource for IDD_TEST_FORM.
# Add an EditBox.
# Add an EditBox.
Line 92: Line 92:
<br />
<br />


#* Start ClassWizard (Ctrl+W), click the Member-Variablen (member variable) tab, select the CTestView class and click &quot;Variable hinzufugen...&quot;.
#* Start ClassWizard (Ctrl+W), click the Member-Variablen (member variable) tab, select the CTestView class and click "Variable hinzufugen...".


Either method makes the &quot;Member-variable hinzufugen...&quot; (Add Member Variable) dialog box appear. The &quot;Name der member variable&quot; listbox should show the member variables of the CRecordset derived class CTestSet.
Either method makes the "Member-variable hinzufugen..." (Add Member Variable) dialog box appear. The "Name der member variable" listbox should show the member variables of the CRecordset derived class CTestSet.
=== Steps to Work Around this Problem ===
=== Steps to Work Around this Problem ===



Latest revision as of 11:03, 21 July 2020

Article ID: 167423

Article Last Modified on 10/17/2003



APPLIES TO

  • Microsoft Visual C++ 5.0 Enterprise Edition
  • Microsoft Visual C++ 5.0 Professional Edition



This article was previously published under Q167423

SYMPTOMS

This problem only occurs in the German localized version of Visual C++ 5.0. When you have Ctrl+DblClk on a dialog box or "Add Member Variable" in Class Wizard, the member variables in the CRecordset class are not displayed.

CAUSE

The Class Wizard fails to translate the strings.

STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This bug has been corrected in Visual Studio 97 Service Pack 1.

For additional information about the Visual Studio 97 Service Pack 1, please see the following article in the Microsoft Knowledge Base:

170365 INFO: Visual Studio 97 Service Packs - What, Where, and Why


MORE INFORMATION

Steps to Reproduce Behavior

  1. Create a new MFC SDI AppWizard project (neu MFC einzeines dokument projekte), and name the project Test.
  2. In MFC AppWizard - step 2 of 6:


    1. Click "Datenbankansicht mit Dateiunterstunterstutzung" (Database view with file support).
    2. Click Datanquelle... (DataSource...).
    3. In the "Datenbankoptionen" (Database Options) dialog box, connect to an ODBC or DAO database. Select a table from the database.
  1. In MFC AppWizard - step 2 of 6 - Click "Fertigstellen" (Finish).
  2. Click the ResourceView for the project and open the dialog resource for IDD_TEST_FORM.
  3. Add an EditBox.
  4. Connect the database fields to the EditBox using one of the following:


    • Press Ctrl+DblClick in the EditBox. -or-


    • Start ClassWizard (Ctrl+W), click the Member-Variablen (member variable) tab, select the CTestView class and click "Variable hinzufugen...".

Either method makes the "Member-variable hinzufugen..." (Add Member Variable) dialog box appear. The "Name der member variable" listbox should show the member variables of the CRecordset derived class CTestSet.

Steps to Work Around this Problem

If you need to connect a field to the EditBox, you have to manually add code to the CTestView::DoDataExchange() function. For example, if you want to connect to the EditBox to the:

   m_pSet->m_StudentID
                

variable, add the following line to void:

   void CTestView::DoDataExchange(CDataExchange* pDX)
                    

which is located in the TextView.cpp file as follows:

  DDX_FieldText(pDX, IDC_EDIT1, m_pSet->m_StudentID, m_pSet);
                

The result should look like the following:

   void CTestView::DoDataExchange(CDataExchange* pDX)
   {
      CRecordView::DoDataExchange(pDX);
      //{{AFX_DATA_MAP(CDbtestView)
      DDX_FieldText(pDX, IDC_EDIT1, m_pSet->m_StudentID, m_pSet);
      //}}AFX_DATA_MAP
   }
                

Keywords: kbbug kbfix kbvs97sp1fix kbdatabase kbwizard KB167423