IGetSession

OLE DB Programmer's Reference

The IGetSession interface returns an interface pointer on the session object within whose context the row object was created.

Every row object is created within the context of a session object. When a consumer creates a row object from a rowset by calling IGetRow::GetRowFromHROW, the row object exists within the context of the session associated with that rowset. When the consumer instantiates a row directly by calling a method such as IBindResource::Bind, the provider creates an implicit session object first and then instantiates the row object in the context of that session.

For many operations, such as creating a containing rowset, creating views, and transacting scoped operations, the consumer needs an interface on the session object within whose context the row exists. The IGetSession interface has a single method that returns the desired interface on the session object associated with a row.

When to Implement

IGetSession is a mandatory interface on row objects.

When to Call

A consumer calls IGetSession::GetSession to get an interface pointer on the session object associated with the row.

Method Description
GetSession Returns an interface pointer on the session object associated with the row.

1998-2001 Microsoft Corporation. All rights reserved.



Microsoft Ole Db 2.0 Programmer's Reference and Data Access SDK
Microsoft OLE DB 2.0 Programmers Reference and Data Access SDK (Microsoft Professional Editions)
ISBN: 0735605904
EAN: 2147483647
Year: 1998
Pages: 1083

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net