Using Microsoft Visual C++

Microsoft Visual C++ provides no mechanism for direct execution (and reporting) of SQL statements. But it does provide MFC classes that can be used to database-enable Windows applications. To use these classes, you should be familiar with MFC and MSVC's AppWizard and ClassWizard. To use these classes, do the following:

  1. Microsoft Visual C++ provides MFC classes that encapsulate ODBC (and DAO) integration. To interact with ODBC, an ODBC Data Source must be present before proceeding. (See the earlier instructions.)

  2. To support the use of ODBC calls, your MFC application must have database support enabled. This option may be selected in the app wizard. (If you are using Visual C++ Enterprise Edition, you can also create a direct database project.)

  3. You'll need a CRecordset class to actually submit the SQL and return results. CRecordset class members can be used to specify SQL statement clauses.

  4. MSVC's AppWizard and ClassWizard are then used to bind columns to selected tables in your recordset.

  5. The CRecordView class can be derived to create a form to display the SQL results.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.226.98.166