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/catalog-information-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
@@ -43,7 +43,7 @@ Information about the tables in a data source can include the names of tables an
43
43
For more information, see [Data Source: Determining the Schema of the Data Source (ODBC)](../data/odbc/data-source-determining-the-schema-of-the-data-source-odbc.md).
44
44
45
45
> [!NOTE]
46
-
> In the MFC DAO classes, you can get catalog information as follows: Use [CDaoDatabase::GetTableDefCount](../Topic/CDaoDatabase::GetTableDefCount.md) and [CDaoDatabase::GetTableDefInfo](../Topic/CDaoDatabase::GetTableDefInfo.md) to enumerate the tables in the database and obtain information for each table in a [CDaoTableDefInfo](../mfc/reference/cdaotabledefinfo-structure.md) structure.
46
+
> In the MFC DAO classes, you can get catalog information as follows: Use [CDaoDatabase::GetTableDefCount](../mfc/reference/cdaodatabase-class.md#cdaodatabase__gettabledefcount) and [CDaoDatabase::GetTableDefInfo](../mfc/reference/cdaodatabase-class.md#cdaodatabase__gettabledefinfo) to enumerate the tables in the database and obtain information for each table in a [CDaoTableDefInfo](../mfc/reference/cdaotabledefinfo-structure.md) structure.
Copy file name to clipboardExpand all lines: docs/data/filling-a-list-box-from-a-second-recordset-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
@@ -58,7 +58,7 @@ By default, a record view is associated with a single recordset object, whose fi
58
58
59
59
3. Empty the combo box of any previous contents.
60
60
61
-
4. Move through all records in the recordset, calling [CComboBox::AddString](../Topic/CComboBox::AddString.md) for each string from the current record you want to add to the combo box.
61
+
4. Move through all records in the recordset, calling [CComboBox::AddString](../mfc/reference/ccombobox-class.md#ccombobox__addstring.md) for each string from the current record you want to add to the combo box.
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](../mfc/reference/cdatabase-class.md#cdatabase__executesql) 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
+3-3Lines changed: 3 additions & 3 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](../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:
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
@@ -130,14 +130,14 @@ This topic applies to the MFC ODBC classes.
130
130
131
131
2. Call its `OpenEx` or **Open** member function.
132
132
133
-
For more information about how to specify the data source if it is something other than the one you specified with a wizard, see [CDatabase::OpenEx](../mfc/reference/cdatabase-class.md#cdatabase__openex) or [CDatabase::Open](../mfc/reference/cdatabase-class.md#cdatabase__open) in the *MFC Reference*.
133
+
For more information about how to specify the data source if it is something other than the one you specified with a wizard, see [CDatabase::OpenEx](../../mfc/reference/cdatabase-class.md#cdatabase__openex) or [CDatabase::Open](../../mfc/reference/cdatabase-class.md#cdatabase__open) in the *MFC Reference*.
134
134
135
135
## <a name="_core_disconnecting_from_a_data_source"></a> Disconnecting from a Data Source
136
136
You must close any open recordsets before calling the **Close** member function of `CDatabase`. In recordsets associated with the `CDatabase` object you want to close, any pending `AddNew` or **Edit** statements are canceled and all pending transactions are rolled back.
137
137
138
138
#### To disconnect from a data source
139
139
140
-
1. Call the `CDatabase` object's [Close](../mfc/reference/cdatabase-class.md#cdatabase__close) 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/dynaset.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
@@ -63,7 +63,7 @@ This topic describes dynasets and discusses their [availability](#_core_availabi
63
63
64
64
- The ODBC cursor library DLL must not be in use for this data source.
65
65
66
-
If the cursor library is used, it masks some functionality of the underlying ODBC driver that is necessary for dynaset support. If you want to use dynasets (and your ODBC driver has the functionality required for dynasets, as described in the rest of this section), you can cause MFC not to load the cursor library when you create a `CDatabase` object. For more information, see [ODBC](../../data/odbc/odbc-basics.md) and the [OpenEx](../mfc/reference/cdatabase-class.md#cdatabase__openex) or [Open](../mfc/reference/cdatabase-class.md#cdatabase__open) member function of class `CDatabase`.
66
+
If the cursor library is used, it masks some functionality of the underlying ODBC driver that is necessary for dynaset support. If you want to use dynasets (and your ODBC driver has the functionality required for dynasets, as described in the rest of this section), you can cause MFC not to load the cursor library when you create a `CDatabase` object. For more information, see [ODBC](../../data/odbc/odbc-basics.md) and the [OpenEx](../../mfc/reference/cdatabase-class.md#cdatabase__openex) or [Open](../../mfc/reference/cdatabase-class.md#cdatabase__open) member function of class `CDatabase`.
67
67
68
68
In ODBC terminology, dynasets and snapshots are referred to as cursors. A cursor is a mechanism used for keeping track of its position in a recordset.
Copy file name to clipboardExpand all lines: docs/data/odbc/odbc-calling-odbc-api-functions-directly.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
@@ -61,7 +61,7 @@ The database classes provide a simpler interface to a [data source](../../data/o
61
61
62
62
For more information about these steps, see the [Open Database Connectivity (ODBC)](https://msdn.microsoft.com/en-us/library/ms710252.aspx) SDK in the MSDN documentation.
63
63
64
-
In addition to these steps, you need to take extra steps to check function return values, ensure that your program is not waiting for an asynchronous call to finish, and so on. You can simplify these last steps by using the `AFX_SQL_ASYNC` and `AFX_SQL_SYNC` macros. For more information, see [Macros and Globals](../Topic/Macros,%20Global%20Functions,%20and%20Global%20Variables.md) in the *MFC Reference*.
64
+
In addition to these steps, you need to take extra steps to check function return values, ensure that your program is not waiting for an asynchronous call to finish, and so on. You can simplify these last steps by using the `AFX_SQL_ASYNC` and `AFX_SQL_SYNC` macros.
Copy file name to clipboardExpand all lines: docs/data/odbc/odbc-the-odbc-cursor-library.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
@@ -78,10 +78,10 @@ This topic describes the ODBC Cursor Library and explains how to use it. For mor
78
78
79
79
The first issue concerns updateable snapshots on tables with timestamp columns. If the table to which your snapshot is bound contains a timestamp column, you should call **Requery** after you call **Edit** and **Update**. If not, you might not be able to edit the same record again. When you call **Edit** and then **Update**, the record is written to the data source and the timestamp column is updated. If you do not call **Requery**, the timestamp value for the record in your snapshot no longer matches the corresponding timestamp on the data source. When you try to update the record again, the data source might disallow the update because of the mismatch.
80
80
81
-
The second issue concerns limitations of class [CTime](../../atl-mfc-shared/reference/ctime-class.md) when used with the `RFX_Date` function to transfer time and date information to or from a table. Processing the `CTime` object imposes some overhead in the form of extra intermediate processing during the data transfer. The date range of `CTime` objects might also be too limiting for some applications. A new version of the `RFX_Date` function takes an ODBC **TIMESTAMP_STRUCT** parameter instead of a `CTime` object. For more information, see `RFX_Date` in [Macros and Globals](../Topic/Macros,%20Global%20Functions,%20and%20Global%20Variables.md) in the *MFC Reference*.
81
+
The second issue concerns limitations of class [CTime](../../atl-mfc-shared/reference/ctime-class.md) when used with the `RFX_Date` function to transfer time and date information to or from a table. Processing the `CTime` object imposes some overhead in the form of extra intermediate processing during the data transfer. The date range of `CTime` objects might also be too limiting for some applications. A new version of the `RFX_Date` function takes an ODBC **TIMESTAMP_STRUCT** parameter instead of a `CTime` object.
82
82
83
83
## <aname="_core_using_the_cursor_library"></a> Using the Cursor Library
84
-
When you connect to a data source — by calling [CDatabase::OpenEx](../mfc/reference/cdatabase-class.md#cdatabase__openex) or [CDatabase::Open](../mfc/reference/cdatabase-class.md#cdatabase__open) — you can specify whether to use the cursor library for the data source. If you will be creating snapshots on that data source, specify the **CDatabase::useCursorLib** option in the `dwOptions` parameter to `OpenEx` or specify **TRUE** for the **bUseCursorLib** parameter to **Open** (the default value is **TRUE**). If your ODBC driver supports dynasets and you want to open dynasets on the data source, do not use the cursor library (it masks some driver functionality needed for dynasets). In that case, do not specify **CDatabase::useCursorLib** in `OpenEx` or specify **FALSE** for the **bUseCursorLib** parameter in **Open**.
84
+
When you connect to a data source — by calling [CDatabase::OpenEx](../../mfc/reference/cdatabase-class.md#cdatabase__openex) or [CDatabase::Open](../../mfc/reference/cdatabase-class.md#cdatabase__open) — you can specify whether to use the cursor library for the data source. If you will be creating snapshots on that data source, specify the **CDatabase::useCursorLib** option in the `dwOptions` parameter to `OpenEx` or specify **TRUE** for the **bUseCursorLib** parameter to **Open** (the default value is **TRUE**). If your ODBC driver supports dynasets and you want to open dynasets on the data source, do not use the cursor library (it masks some driver functionality needed for dynasets). In that case, do not specify **CDatabase::useCursorLib** in `OpenEx` or specify **FALSE** for the **bUseCursorLib** parameter in **Open**.
0 commit comments