联盟首页 协同开发 共创软件 开放源码 软件工程 共创论坛 关于联盟
  您的位置 » 开放源码库【成熟 - 项目摘要 首页 | 分类源码 | 提交源码 | 下载统计 | 原创源码 | 成熟源码 | 代码片断
 
 Classes for direct SQL calls with ODBC - 项目摘要
摘要 | 管理 | 论坛
文档 | 软件包

源码库中源码数量为15579
有贡献人员名单:

-= 更多 =-
  • ffdshow
  • Air Traffic Controller
  • jasperreports
  • PoolMan
  • Apache-SSL-Jserv
  • virtualdub-win
  • CppUnit
  • GLgraph
  • Step Mania
  • FCK editor
  • -= 更多 =-

    项目描述:
    The main class for doing this is CSQLDirect. CSQLDirect has the following attributes/functions:

    CSQLDirect::Connect - Connects to a datasource.
    CSQLDirect::ExecuteSQL - this is the main function that is used for handling the SQL statement.
    CSQLDirect::GetCol - Will return a column from a table in the resulting cursor.
    CSQLDirect::GetError - Provides detailed error messages in case something went wrong.
    CSQLDirect::GetColumnType - Provides information about a cursor's column.
    CSQLDirect::Fetch - Will properly execute a SQLFetch command with error handling.
    CSQLDirect::Close - Closes the connection to the datasource.
    The other class CSQLColumn is a support class for CSQLDirect. Since multiple queries to a cursor's column will result in a NULL value being returned, I found it necessary to keep track of the columns as they are used. This is stored in a CPtrArray within CSQLDirect and is cleaned up after each time the cursor is requeried/closed.


    通过ODBC直接调用SQL的类

    这项工作的主函数是CSQLDirect。CSQLDirect函数具有以下的属性/功能:
    CSQLDirect::Connect - 连接数据源
    CSQLDirect::ExecuteSQL - t这是处理SQL声明的主要函数
    CSQLDirect::GetCol - 返回光标处的一个记录
    CSQLDirect::GetError - 当有错误发生时,提供详细的出错信息
    CSQLDirect::GetColumnType - 提供一个关于光标所在栏的信息
    CSQLDirect::Fetch - 合适的处理一个错误的SQL指令
    CSQLDirect::Close - 关闭与数据源的连接
    另外了一个类 CSQLColumn支持CSQLDirect类 。 因为对鼠标所在位置的多项查询,容易导致控制的返回。我发现必须跟踪所使用的栏。这个被保存在CSQLDirect中的CPtrArray中,并且在每次光标被调用或关闭时被清空。  

    来源: http://www.codeguru.com/mfc_database/direct_sql_with_odbc.shtml
    类别:
    发布者: cbd002

    最新发布源码包
    软件包 版本号 日期 本地下载
    direct_sql_with  1.0  2004-04-18 下载

    原始下载连接(国外) http://www.codeguru.com/code/legacy/mfc_database/direct_sql_with_odbc.zip

      » 合 作 伙 伴