有谁知道Tsession组件是用来做什么的,能详细讲讲吗?

解决方案 »

  1.   

    Use TSession to manage a group of database connections within an application. There are three uses for TSession: standard, multiple net files for Paradox, and multi-threaded database applications.Delphi automatically creates a globally accessible default TSession component named Session for all database applications. The default session component handles standard database connections. An application can control the default session by accessing its properties, events, and methods at runtime.Database applications that must simultaneously access Paradox tables located in different network locations can establish multiple sessions, one for each network location.Finally, database applications that must establish multiple, concurrent connections to the same database, such as performing two queries against the same data at once, are multi-threaded applications. Multi-threaded applications must create and maintain one additional session component for each simultaneous connection to a single database server.Note: Applications that maintain multiple sessions can manage them through the TSessionList component. A default session list component, called Sessions梟ote the plural which distinguishes it from the default session component, Session梚s automatically created for all database applications.
    Note: TSession implements the IDBSession interface, which allows the global PasswordDialog function to supply passwords to the component.
      

  2.   

    Tsession组件为应用程序提供了对一组数据库连接进行全程管理的方法。
    Delphi自动为所有数据库应用程序产生一个名为Session的TSession对象。这个默认对象处理标准的数据库连接。
    在你的程序中use DBTables 就可以访问Session ,通过访问他的属性,方法,事件来控制他
      

  3.   

    TSession控件能够对一个应用程序中的一组TDatabase控件提供全局控制。有些时候,应用程序需要对TDatabase控件进行控制,此时除了使用默认的BDE会话期对象外,还需要自己显示地创建TSession控件。