FAQs about Session

  1. I would like to know whether OLDEBPro is made for the following tasks: If so, please indicate me the examples that illustrate the above items.
       
         To open databases and get their structure at run time.
            To create databases - add tables columns and fill them with data.

           
    Yes to all the two questions. OleDBPro is able to uses template COSchema<T> to open all the schema rowsets supported by any one of OLEDB providers. You can see the provided examples Oschema and OLAP. OleDBPro uses COSession and COSessionEx to wrap all the methods available to manage various database objects like tables, columns, indexes, keys and constraints. OleDBPro provides two examples, MkTbls and MkTblsEx, to show you how to add/delete these database objects.
  2. Can I use OleDBPro with Microsoft transaction server for a distributed transaction?
            Yes! OLEDB provides interface ITransactionJoin for this purpose. You can query this interface through COSession::m_pIOpenRowset. One example can be found at MSDN\Platform SDK\Data Services\Microsoft SQL Server Programmer's Toolkit\Building SQL Server Application\Transactions\Supporting Distributed Transactions.