You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/data/ado-rdo/databinding-with-activex-controls-in-visual-cpp.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -46,7 +46,7 @@ Databinding is implemented through two types of ActiveX controls: data controls
46
46
> ADO and RDO data controls are an older technology that was released in a earlier version of Visual Studio, and might not be available in the current version. To use the information in this section, you might have to obtain a earlier release to acquire the appropriate control.
47
47
48
48
**Data-bound controls**
49
-
A data-bound control is responsible for presenting the data. Data-bound controls connect to data controls to receive data and present the data through a variety of user interfaces. A Visual C++ application can also bind variables to data values set in the data-bound controls; see [CWnd::BindProperty](../Topic/CWnd::BindProperty.md).
49
+
A data-bound control is responsible for presenting the data. Data-bound controls connect to data controls to receive data and present the data through a variety of user interfaces. A Visual C++ application can also bind variables to data values set in the data-bound controls; see [CWnd::BindProperty](../mfc/reference/cwnd-class.md#cwnd__bindproperty).
Copy file name to clipboardExpand all lines: docs/data/ado-rdo/modifying-a-control-s-run-time-behavior.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,7 +45,7 @@ After you [insert a control](../../data/ado-rdo/inserting-the-control-into-a-vis
45
45
If you want to use ADO and RDO directly, you should connect to the ADO or RDO DLLs directly (Msado15.dll or Msrdo20.dll), either with the [compiler COM support classes](../../cpp/compiler-com-support-classes.md), which support the [#import directive](../../preprocessor/preprocessor-directives.md), or with the respective SDK.
46
46
47
47
## To Set Control Properties at Run Time
48
-
Note that some properties of an ActiveX control might be read-only at run time, which makes dynamic creation difficult. You can temporarily simulate design mode for property initialization by overriding the control container's [OnAmbientPropertyChange](../Topic/COleControl::OnAmbientPropertyChange.md) handler, as described in the Knowledge Base article, "How to: Set ActiveX Control Design-Time Properties at Run Time (Q260744)". You can find Knowledge Base articles at [http://support.microsoft.com/](http://support.microsoft.com/).
48
+
Note that some properties of an ActiveX control might be read-only at run time, which makes dynamic creation difficult. You can temporarily simulate design mode for property initialization by overriding the control container's [OnAmbientPropertyChange](../mfc/reference/colecontrol-class.md#colecontrol__onambientpropertychange) handler, as described in the Knowledge Base article, "How to: Set ActiveX Control Design-Time Properties at Run Time (Q260744)". You can find Knowledge Base articles at [http://support.microsoft.com/](http://support.microsoft.com/).
Copy file name to clipboardExpand all lines: docs/data/ado-rdo/wrapper-classes.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,7 +41,7 @@ When you [insert a control](../../data/ado-rdo/inserting-the-control-into-a-visu
41
41
42
42
For more information about the functionality of the wrapper classes, see the object model for the control's base technology.
43
43
44
-
Using [CWnd::GetDlgItem](../Topic/CWnd::GetDlgItem.md) also requires wrapper classes because the return value must be cast to the control class. For example:
44
+
Using [CWnd::GetDlgItem](../mfc/reference/cwnd-class.md#cwnd__getdlgitem) also requires wrapper classes because the return value must be cast to the control class. For example:
Copy file name to clipboardExpand all lines: docs/data/changes-you-might-make-to-the-default-code-mfc-data-access.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,7 +39,7 @@ The [MFC Application Wizard](../mfc/reference/database-support-mfc-application-w
39
39
40
40
- Parameterize the recordset. Specify the actual run-time parameter value after the filter. For more information, see [Recordset: Parameterizing a Recordset (ODBC)](../data/odbc/recordset-parameterizing-a-recordset-odbc.md)
41
41
42
-
- Pass a customized SQL string to the [Open](../Topic/CRecordset::Open.md) member function. For a discussion of what you can accomplish with this technique , see [SQL: Customizing Your Recordset's SQL Statement (ODBC)](../data/odbc/sql-customizing-your-recordset’s-sql-statement-odbc.md).
42
+
- Pass a customized SQL string to the [Open](../mfc/reference/crecordset-class.md#crecordset__open) member function. For a discussion of what you can accomplish with this technique , see [SQL: Customizing Your Recordset's SQL Statement (ODBC)](../data/odbc/sql-customizing-your-recordset’s-sql-statement-odbc.md).
43
43
44
44
## See Also
45
45
[Using a Record View](../data/using-a-record-view-mfc-data-access.md)
Copy file name to clipboardExpand all lines: docs/data/odbc/access-to-odbc-and-sql.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,7 +41,7 @@ translation.priority.mt:
41
41
# Access to ODBC and SQL
42
42
The Microsoft Foundation Class Library encapsulates many Windows API calls and still lets you call any Windows API function directly. The database classes give you the same flexibility with regard to the ODBC API. While the database classes shield you from much of the complexity of ODBC, you can call ODBC API functions directly from anywhere in your program.
43
43
44
-
Similarly, the database classes shield you from having to work much with [SQL](../../data/odbc/sql.md), but you can use SQL directly if you want. You can customize recordset objects by passing a custom SQL statement (or setting portions of the default statement) when you open the recordset. You can also make SQL calls directly using the [ExecuteSQL](../Topic/CDatabase::ExecuteSQL.md) member function of class [CDatabase](../../mfc/reference/cdatabase-class.md).
44
+
Similarly, the database classes shield you from having to work much with [SQL](../../data/odbc/sql.md), but you can use SQL directly if you want. You can customize recordset objects by passing a custom SQL statement (or setting portions of the default statement) when you open the recordset. You can also make SQL calls directly using the [ExecuteSQL](../mfc/reference/cdatabase-class.md#cdatabase__executesql) member function of class [CDatabase](../../mfc/reference/cdatabase-class.md).
45
45
46
46
For more information, see [ODBC: Calling ODBC API Functions Directly](../../data/odbc/odbc-calling-odbc-api-functions-directly.md) and [SQL: Making Direct SQL Calls (ODBC)](../../data/odbc/sql-making-direct-sql-calls-odbc.md).
Copy file name to clipboardExpand all lines: docs/data/odbc/data-source-managing-connections-odbc.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -93,7 +93,7 @@ This topic applies to the MFC ODBC classes.
93
93
If multiple users are connected to a data source, they can change data while you are manipulating it in your recordsets. Similarly, your changes might affect other users' recordsets. For more information, see [Recordset: How Recordsets Update Records (ODBC)](../../data/odbc/recordset-how-recordsets-update-records-odbc.md) and [Transaction (ODBC)](../../data/odbc/transaction-odbc.md).
94
94
95
95
## <aname="_core_generalizing_the_connection_string"></a> Generalizing the Connection String
96
-
The wizards use a default connection string to establish a connection to a data source. You use this connection to view tables and columns while you are developing your application. However, this default connection string might not be appropriate for your users' connections to the data source through your application. For example, their data source and the path to its location might be different from the one used in developing your application. In that case, you should reimplement the [CRecordset::GetDefaultConnect](../Topic/CRecordset::GetDefaultConnect.md) member function in a more generic fashion and discard the wizard implementation. For example, use one of the following approaches:
96
+
The wizards use a default connection string to establish a connection to a data source. You use this connection to view tables and columns while you are developing your application. However, this default connection string might not be appropriate for your users' connections to the data source through your application. For example, their data source and the path to its location might be different from the one used in developing your application. In that case, you should reimplement the [CRecordset::GetDefaultConnect](../mfc/reference/crecordset-class.md#crecordset__getdefaultconnect) member function in a more generic fashion and discard the wizard implementation. For example, use one of the following approaches:
97
97
98
98
- Register and manage the connection strings using ODBC Administrator.
99
99
@@ -137,7 +137,7 @@ This topic applies to the MFC ODBC classes.
137
137
138
138
#### To disconnect from a data source
139
139
140
-
1. Call the `CDatabase` object's [Close](../Topic/CDatabase::Close.md) member function.
140
+
1. Call the `CDatabase` object's [Close](../mfc/reference/cdatabase-class.md#cdatabase__close) member function.
141
141
142
142
2. Destroy the object unless you want to reuse it.
Copy file name to clipboardExpand all lines: docs/data/odbc/record-field-exchange-how-rfx-works.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -61,7 +61,7 @@ This topic explains the RFX process. This is an advanced topic covering:
61
61
This section describes the sequence of RFX events as a recordset object is opened and as you add, update, and delete records. The table [Sequence of RFX Operations During Recordset Open](#_core_sequence_of_rfx_operations_during_recordset_open) and the table [Sequence of RFX Operations During Scrolling](#_core_sequence_of_rfx_operations_during_scrolling) in this topic show the process as RFX processes a **Move** command in the recordset and as RFX manages an update. During these processes, [DoFieldExchange](../Topic/CRecordset::DoFieldExchange.md) is called to perform many different operations. The **m_nOperation** data member of the [CFieldExchange](../../mfc/reference/cfieldexchange-class.md) object determines which operation is requested. You might find it helpful to read [Recordset: How Recordsets Select Records (ODBC)](../../data/odbc/recordset-how-recordsets-select-records-odbc.md) and [Recordset: How Recordsets Update Records (ODBC)](../../data/odbc/recordset-how-recordsets-update-records-odbc.md) before you read this material.
62
62
63
63
### <aname="_mfc_rfx.3a_.initial_binding_of_columns_and_parameters"></a> RFX: Initial Binding of Columns and Parameters
64
-
The following RFX activities occur, in the order shown, when you call a recordset object's [Open](../Topic/CRecordset::Open.md) member function:
64
+
The following RFX activities occur, in the order shown, when you call a recordset object's [Open](../mfc/reference/crecordset-class.md#crecordset__open) member function:
65
65
66
66
- If the recordset has parameter data members, the framework calls `DoFieldExchange` to bind the parameters to parameter placeholders in the recordset's SQL statement string. A data type-dependent representation of the value of the parameter is used for each placeholder found in the **SELECT** statement. This occurs after the SQL statement is prepared but before it is executed. For information about statement preparation, see the **::SQLPrepare** function in the ODBC *Programmer's Reference*.
67
67
@@ -111,7 +111,7 @@ This topic explains the RFX process. This is an advanced topic covering:
111
111
112
112
3. You directly set the values of field data members whose values you want to edit or that you want filled for a new record. This can include calling `SetFieldNull`.
113
113
114
-
4. Your call to [Update](../Topic/CRecordset::Update.md) checks for changed field data members, as described in step 2 (see the table [Sequence of RFX Operations During Scrolling](#_core_sequence_of_rfx_operations_during_scrolling)). If none have changed, **Update** returns 0. If some field data members have changed, **Update** prepares and executes a SQL **INSERT** statement that contains values for all updated fields in the record.
114
+
4. Your call to [Update](../mfc/reference/crecordset-class.md#crecordset__update) checks for changed field data members, as described in step 2 (see the table [Sequence of RFX Operations During Scrolling](#_core_sequence_of_rfx_operations_during_scrolling)). If none have changed, **Update** returns 0. If some field data members have changed, **Update** prepares and executes a SQL **INSERT** statement that contains values for all updated fields in the record.
115
115
116
116
5. For `AddNew`, **Update** concludes by restoring the previously stored values of the record that was current before the `AddNew` call. For **Edit**, the new, edited values remain in place.
Copy file name to clipboardExpand all lines: docs/data/odbc/record-field-exchange-using-rfx.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -51,11 +51,11 @@ This topic explains what you do to use RFX in relation to what the framework doe
51
51
|You|The framework|
52
52
|---------|-------------------|
53
53
|Declare your recordset classes with a wizard. Specify names and data types of field data members.|The wizard derives a `CRecordset` class and writes a [DoFieldExchange](../Topic/CRecordset::DoFieldExchange.md) override for you, including an RFX function call for each field data member.|
54
-
|(Optional) Manually add any needed parameter data members to the class. Manually add an RFX function call to `DoFieldExchange` for each parameter data member, add a call to [CFieldExchange::SetFieldType](../Topic/CFieldExchange::SetFieldType.md) for the group of parameters, and specify the total number of parameters in [m_nParams](../Topic/CRecordset::m_nParams.md). See [Recordset: Parameterizing a Recordset (ODBC)](../../data/odbc/recordset-parameterizing-a-recordset-odbc.md).||
55
-
|(Optional) Manually bind additional columns to field data members. Manually increment [m_nFields](../Topic/CRecordset::m_nFields.md). See [Recordset: Dynamically Binding Data Columns (ODBC)](../../data/odbc/recordset-dynamically-binding-data-columns-odbc.md).||
54
+
|(Optional) Manually add any needed parameter data members to the class. Manually add an RFX function call to `DoFieldExchange` for each parameter data member, add a call to [CFieldExchange::SetFieldType](../mfc/reference/cfieldexchange-class.md#cfieldexchange__setfieldtype) for the group of parameters, and specify the total number of parameters in [m_nParams](../mfc/reference/crecordset-class.md#crecordset__m_n_params). See [Recordset: Parameterizing a Recordset (ODBC)](../../data/odbc/recordset-parameterizing-a-recordset-odbc.md).||
55
+
|(Optional) Manually bind additional columns to field data members. Manually increment [m_nFields](../mfc/reference/crecordset-class.md#crecordset__m_n_fields). See [Recordset: Dynamically Binding Data Columns (ODBC)](../../data/odbc/recordset-dynamically-binding-data-columns-odbc.md).||
56
56
|Construct an object of your recordset class. Before using the object, set the values of its parameter data members, if any.|For efficiency, the framework prebinds the parameters, using ODBC. When you pass parameter values, the framework passes them to the data source. Only the parameter values are sent for requeries, unless the sort and/or filter strings have changed.|
57
-
|Open a recordset object using [CRecordset::Open](../Topic/CRecordset::Open.md).|Executes the recordset's query, binds columns to field data members of the recordset, and calls `DoFieldExchange` to exchange data between the first selected record and the recordset's field data members.|
58
-
|Scroll in the recordset using [CRecordset::Move](../Topic/CRecordset::Move.md) or a menu or toolbar command.|Calls `DoFieldExchange` to transfer data to the field data members from the new current record.|
57
+
|Open a recordset object using [CRecordset::Open](../mfc/reference/crecordset-class.md#crecordset__open).|Executes the recordset's query, binds columns to field data members of the recordset, and calls `DoFieldExchange` to exchange data between the first selected record and the recordset's field data members.|
58
+
|Scroll in the recordset using [CRecordset::Move](../mfc/reference/crecordset-class.md#crecordset__move) or a menu or toolbar command.|Calls `DoFieldExchange` to transfer data to the field data members from the new current record.|
59
59
|Add, update, and delete records.|Calls `DoFieldExchange` to transfer data to the data source.|
[DoFieldExchange](../Topic/CRecordset::DoFieldExchange.md) is the heart of RFX. The framework calls `DoFieldExchange` any time it needs to move data either from data source to recordset or from recordset to data source. `DoFieldExchange` also supports obtaining information about field data members through the [IsFieldDirty](../Topic/CRecordset::IsFieldDirty.md) and [IsFieldNull](../Topic/CRecordset::IsFieldNull.md) member functions.
99
+
[DoFieldExchange](../Topic/CRecordset::DoFieldExchange.md) is the heart of RFX. The framework calls `DoFieldExchange` any time it needs to move data either from data source to recordset or from recordset to data source. `DoFieldExchange` also supports obtaining information about field data members through the [IsFieldDirty](../mfc/reference/crecordset-class.md#crecordset__isfielddirty) and [IsFieldNull](../mfc/reference/crecordset-class.md#crecordset__isfieldnull) member functions.
100
100
101
101
The following `DoFieldExchange` override is for the `CSections` class. The wizard writes the function in the .cpp file for your recordset class.
- This section of the function is called the field map.
118
118
119
-
- A call to `CFieldExchange::SetFieldType`, through the `pFX` pointer. This call specifies that all RFX function calls up to the end of `DoFieldExchange` or the next call to `SetFieldType` are output columns. For more information, see [CFieldExchange::SetFieldType](../Topic/CFieldExchange::SetFieldType.md).
119
+
- A call to `CFieldExchange::SetFieldType`, through the `pFX` pointer. This call specifies that all RFX function calls up to the end of `DoFieldExchange` or the next call to `SetFieldType` are output columns. For more information, see [CFieldExchange::SetFieldType](../mfc/reference/cfieldexchange-class.md#cfieldexchange__setfieldtype).
120
120
121
121
- Several calls to the `RFX_Text` global function — one per field data member (all of which are `CString` variables in the example). These calls specify the relationship between a column name on the data source and a field data member. The RFX functions do the actual data transfer. The class library supplies RFX functions for all the common data types. For more information about RFX functions, see [Record Field Exchange: Using the RFX Functions](../../data/odbc/record-field-exchange-using-the-rfx-functions.md).
- An initialization for the [m_nFields](../Topic/CRecordset::m_nFields.md) data member, which contains the number of field data members
133
+
- An initialization for the [m_nFields](../mfc/reference/crecordset-class.md#crecordset__m_n_fields) data member, which contains the number of field data members
134
134
135
135
The constructor for the `CSections` recordset example looks like this:
This is the code for adding three new fields. If you add any parameter data members, you must initialize the [m_nParams](../Topic/CRecordset::m_nParams.md) data member, which contains the number of parameter data members. Put the `m_nParams` initialization outside the brackets.
157
+
This is the code for adding three new fields. If you add any parameter data members, you must initialize the [m_nParams](../mfc/reference/crecordset-class.md#crecordset__m_n_params) data member, which contains the number of parameter data members. Put the `m_nParams` initialization outside the brackets.
158
158
159
159
## See Also
160
160
[Record Field Exchange (RFX)](../../data/odbc/record-field-exchange-rfx.md)
0 commit comments