General discussion

Locked

Disconnected Recordsets

By srudolph_ ·
How can a connect a cisconnected recordset to an existing Grid control. Specifically I'm using the True DB Grid from APEX right now and would like to continue using it because of some functionality I haven't found in other grids. But it requires both a DataMember, and a DataSource in order to bind. Can I mimic this, or should I just try a Different Route?

This conversation is currently closed to new comments.

3 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Disconnected Recordsets

by Limbo In reply to Disconnected Recordsets

You need to create a Public instance of your disconnected recordset, and assign this to your Grid.

Assuming you are using ADO in a class, create a Public property like this.

Public Property Get DataSource() as Variant
Set DataSource = rsPrimary ' your recordset
End Property

Ensure the 'DataSourceBehviour' property of this class is set to 'vbDataSource' at design time.

Now create an instance of the class in the form with the grid, then bind as follows.

Set grdMain.Datasource = ClassInstance.Datasource

And bobs your uncle.

You can expose DataMember in the same fashion, creating an indexed property in the class, which returns the primary recordsets field name property.

Collapse -

Disconnected Recordsets

by srudolph_ In reply to Disconnected Recordsets

This could work, but it makes the class more complex then I wanted. What I'm doing instead is creating a clone of the recordset to a ADODC control on the form and binding the grid in code.

Thanx for your help
Shawn

Collapse -

Disconnected Recordsets

by srudolph_ In reply to Disconnected Recordsets

This question was closed by the author

Back to Web Development Forum
3 total posts (Page 1 of 1)  

Related Discussions

Related Forums