YOU CAN CODE!

 

With The Case Of UCanCode.net  Release The Power OF  Visual C++ !   HomeProducts | PurchaseSupport | Downloads  
Download Evaluation
Pricing & Purchase?
E-XD++Visual C++/ MFC Products
Overview
Features Tour 
Electronic Form Solution
Visualization & HMI Solution
Power system HMI Solution
CAD Drawing and Printing Solution

Bar code labeling Solution
Workflow Solution

Coal industry HMI Solution
Instrumentation Gauge Solution

Report Printing Solution
Graphical modeling Solution
GIS mapping solution

Visio graphics solution
Industrial control SCADA &HMI Solution
BPM business process Solution

Industrial monitoring Solution
Flowchart and diagramming Solution
Organization Diagram Solution

Graphic editor Source Code
UML drawing editor Source Code
Map Diagramming Solution

Architectural Graphic Drawing Solution
Request Evaluation
Purchase
ActiveX COM Products
Overview
Download
Purchase
Technical Support
  General Q & A
Discussion Board
Contact Us

Links

Get Ready to Unleash the Power of UCanCode .NET

 


UCanCode Software focuses on general application software development. We provide complete solution for developers. No matter you want to develop a simple database workflow application, or an large flow/diagram based system, our product will provide a complete solution for you. Our product had been used by hundreds of top companies around the world!

"100% source code provided! Free you from not daring to use components because of unable to master the key technology of components!"


VC++ Ado Tutorial, VC++ Ado Sample, VC++ Ado Example

 
 
This is consist of 2 classes.
  • CDyndb : This Class manages connections and recordsets. Recordsets are organized as linked list (CList) and you can access them using their ids.
  • CDynRec : This class is the node to populate for each recordsets.
Simply follow these steps in order to use the ADO Example and Sample wrapper classes:
  1. You need to add the following line stdafx.h :
    #import "c:\program files\common files\system\ado\msado21.tlb" no_namespace rename ("EOF", "adoEOF")
    
  2. Call the OpenConn function
    theApp.m_dyndb.OpenConn("driver=sql server;server=dogu;UID=sa;PWD=;database=dbtraining;");
    
  3. Call OpenRec function
    theApp.m_dyndb.OpenRec("select * from Courses");
    
  4. Call GetFieldVal function to get the value of the fields. This function returns variant type. You can cast it as usual way like "short(variantdata);"
    vardat=theApp.m_dyndb.GetFieldVal(0,2);
    
  5. Call GetFieldType to get the type of the field. "en" has a definition like DataTypeEnum en; (see MSDN for details)
    en=theApp.m_dyndb.GetFieldType(0,2);
    
  6. Call GetFieldCount to get the number of the fields that selected in the recordset.

     

  7. Call GetFieldName to obtain the name of the field.
To iterate through a recordset, you can use the m_pRecordSet member functions MoveXXX

Downloads VC++ Example, and Example

Download source - 2 Kb
Download demo project - 121

 

 

 

Copyright ?1998-2022 UCanCode.Net Software , all rights reserved.
Other product and company names herein may be the trademarks of their respective owners.

Please direct your questions or comments to webmaster@ucancode.net