readme.txt

来自「Send SMS useing Com,it is simple」· 文本 代码 · 共 111 行

TXT
111
字号
Title: SAMPLE: AdoDataGrid.exe Demonstrates Using ADO with DataGrid

-------------------------------------------------------------------------------
The information in this article applies to:

 - ActiveX Data Objects (ADO), versions 2.0, 2.1 
 - Microsoft Visual C++, 32-bit Enterprise Edition, version 6.0 
-------------------------------------------------------------------------------

SUMMARY
=======

The AdoDataGrid sample demonstrates the various uses and combinations of ADO
objects, and shows how to use the ADO Recordset object to populate the Microsoft
DataGrid control, which makes presenting data through ADO very easy in Visual
C++.

The sample also shows how to get results (recordset) based on run-time queries
and how to populate the DataGrid control with that recordset. This sample
application also demonstrates how to use the OLE DB DataLink interface to build
a connection string at run time.

MORE INFORMATION
================

The following file is available for download from the Microsoft Software
Library:

   AdoDataGrid.exe
   (http://support.microsoft.com/download/support/mslfiles/AdoDataGrid.exe)

Release Date: May-27-1999

For more information about downloading files from the Microsoft Software Library,
please see the following article in the Microsoft Knowledge Base:

   Q119591 How to Obtain Microsoft Support Files from Online Services

The AdoDataGrid sample is a FormView-based SDI MFC application. All the files are
wizard-generated. After inserting the ActiveX object (Microsoft DataGrid
control), the wizard will provide CColumn, CColumns, CDataFormatDisp, CDataGrid,
COleFont, CPicture, CSelBookmarks, CSplit, CSplits, and CStdDataFormatsDisp
classes in their respective files. No modification was made in DataGrid and its
dependent files for this sample.

In this sample, code for manipulating ADO objects is located in
AdoDataGridView.cpp. The #import statement for ADO is located in Stdafx.h.

There are three methods to use ADO with Visual C++. In this project, the #import
method is used. For additional information about other methods, please see the
following article in the Microsoft Knowledge Base:

   Q174565 Adovc.exe Demonstrates How to Use ADO with Visual C++

Brief Description of User Interface
-----------------------------------

 - BuildConnStr launches the OLE DB DataLink connection dialog box, which is a
   container for a connection string. You can manually type in the connection
   string in a given edit box.

 - Connect uses a connection string in the given edit box and connects to the
   data source. Upon connecting to the data source, Connect populates the list
   with all the tables available in the data source.

 - Get Tables populates the list of all tables. You can click any table and
   DataGrid will be populated with the rows from the table.

 - ReQuery regenerates results based on a user-typed query in the query edit
   box.

 - Disconnect disconnects from the Data source and clears out Datagrid. Notice
   that the user can still type in a connection string and query and get the
   resultset back by clicking ReQuery, because ReQuery creates an explicit
   connection to the DataSource.

NOTE: Datalink (OLE DB connection string building interface) was moved from
Msdasc.dll to Oledb32.dll in MDAC 2.1. If you have MDAC version 2.1 or later
installed on your machine, replace Msdasc.dll with Oledb32.dll in the #import
statement in StdAfx.h.

For additional information about this problem, please see the following article
in the Microsoft Knowledge Base:

   Q225132 DataLink Type Library Moved from Msdasc.dll to Oledb32.dll

Microsoft provides programming examples for illustration only, without warranty
either expressed or implied, including, but not limited to, the implied
warranties of merchantability and/or fitness for a particular purpose. This
article assumes that you are familiar with the programming language being
demonstrated and the tools used to create and debug procedures. Microsoft
support professionals can help explain the functionality of a particular
procedure, but they will not modify these examples to provide added
functionality or construct procedures to meet your specific needs. If you have
limited programming experience, you may want to contact a Microsoft Certified
Solution Provider or the Microsoft fee-based consulting line at (800) 936-5200.
For more information about Microsoft Certified Solution Providers, please see
the following page on the World Wide Web:

   http://www.microsoft.com/mcsp/

For more information about the support options available from Microsoft, please
see the following page on the World Wide Web:

   http://www.microsoft.com/support/supportnet/refguide/

REFERENCES
==========

(c) Microsoft Corporation 1999, All Rights Reserved.
Contributions by Saqib Rasool, Microsoft Corporation

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?