Special class to handle shaped recordsets
CLASS AdoShapeServer INHERIT AdoServer
|StayInSync||Do child servers stay in sync with parent records|
|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|
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.
CLASS PubServer INHERIT AdoShapeServer
EXPORT oTitles AS AdoShapeServer // Child server for Titles table
METHOD Init() CLASS PubServer
oConn := AdoConnection
oConn:Provider := "MSDataShape"
oConn:Open ( "Data Provider=SQLOLEDB;" + ;
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)