AdoShapeServer Class

<< Click to Display Table of Contents >>

Navigation:  Dataservers >

AdoShapeServer Class

Previous pageReturn to chapter overviewNext page

Purpose

 

Special class to handle shaped recordsets

 

Prototype

 

CLASS AdoShapeServer INHERIT AdoServer 

 

Access

 

StayInSyncDo child servers stay in sync with parent records

 

Assign

 

StayInSyncDo child servers stay in sync with parent records

 

Method

ClearRelation()Clear relations to Shaped DatSet Child Servers
Notify()An event handler that responds to events of this server
Relation()Returns the symbolic name of a relation
ResetNotification()Resume the broadcasting of Notify messages
SetRelation()Open a Server for a Shaped column in the DataSet
SuspendNotification()Suspend the broadcasting of Notify messages

 

Description

 

This class is designed to work with so-called 'Shaped' recordsets that can be created using the MsDataShape provider.

Please note that the 'StayInSync' property of the recordset is switched on automatically as soon as child servers are opened.

This may have a negative effect on performance. You can switch the 'StayinSync' off manually, but then the relations won't work as expected.

 

Example(s)

 

CLASS PubServer INHERIT AdoShapeServer

EXPORT oTitles AS AdoShapeServer // Child server for Titles table

METHOD Init() CLASS PubServer

LOCAL  oConn

   oConn   := AdoConnection

   oConn:Provider := "MSDataShape"

   oConn:Open ( "Data Provider=SQLOLEDB;" + ;

                "Server=cpserver;uid=sa;pwd=;database=pubs",NIL,NIL,NIL)

  SUPER:init ( "SHAPE  select * from publishers APPEND " + ;

    " (select * from titles  " + ;

        " RELATE pub_id TO pub_id) AS chapTitles",  oConn,adOpenStatic,adLockReadonly,</text>NIL)

  SELF:oTitles := SELF:SetRelation(#chapTitles)

RETURN SELF

 

See Also

 

AdoServer, DataServer Classes