C1 Community
ComponentOne Community is a free source for developers and help authors to collaborate and communicate.

2.0.20071.177 Virtual Mode with VistaDB

rated by 0 users
This post has 5 Replies | 0 Followers

Not Ranked
Posts 12
mbfsjft Posted: Sat, May 23 2009 11:55 AM

I have C1Studio Enterprise but my subscription is older and has run out. 

Hi I am using VistaDB as my embedded database.  VistaDB is a pure ADO.NET provider and has no oledb interface.  VistaDB is 100% compliant with ADO.NET; Misrosoft certified their compliance.  VistaDB will export schema to XSD

What I need to do is to virtualize my data calls for several grids and drop-downs that are being loaded with thousands, up to millions of rows.  I spent a while trying to get VistaaDB to build something akin to SQLCE's SQLCEResultSet object, and then in a desperate search found out that I may already have what I need.

As I understand it, I can define a virtual dataset equivalent that is bound to the datasource of a C1TrueDBGrid (and not a Datagridview because of some lack of functionality) and you will handle fetching of rows from the data set in real time.

 My questions are:

  1. Can this code work with a pure ADO.NET provider?  Or a provider factory?  If so, how?  I could import the XSD into a C1SchemaDef (which itself is a problem because we use one generic grid form for all grid work and control its appearance and content with SQL calls from an encapsulating object), but I could not get a connection string to work.  This is likely because it uses a VistaDBConnection object to make the connection and not any manner of generic connection.
  2. Do I have to define the whole schema over to your components to use this virtual mode?  If so can this be done at run time somehow?  if so again, is there an example of doing this?
  3. Will the C1TrueDBDropDown work in the same virtual mode as the C1TrueDBGrid?

Thanks; I would like to use this because I don't want to have to spend $2K on a second tool when I already have this one.

 

Top 10 Contributor
Posts 1,644
Hi,

> Can this code work with a pure ADO.NET provider?

I don't know much about the VistaDB data provider. You can try to use it from
C1DataObjects as a custom data provider. See the "Using Other (Custom)
..NET Data Providers" topic in C1Data documentation. For example, you may
take a look at the CustomDataProvider sample.

> Do I have to define the whole schema over to your components to use this
> virtual mode?

Yes. This schema must include at least one simple table and the DataSetDef
object definition.

> If so can this be done at run time somehow? if so again, is there an example of doing this?

This is possible. For example, see the Programmatic sample to C1DataObjects.

>
> Will the C1TrueDBDropDown work in the same virtual mode as the C1TrueDBGrid?

It looks like the virtual mode works in both controls.

Regards,

-Andrey
Not Ranked
Posts 12
mbfsjft replied on Sun, May 24 2009 11:58 PM

Neither example is informative. Customdataprovider appeared to have no code whatsoever to link to an ado.net provider.

Programmatic sample was a little better, but it seems that your system cannot work on pure ado.net.

Top 10 Contributor
Posts 1,644

> What I need to do is to virtualize my data calls for several grids and drop-downs
> that are being loaded with thousands, up to millions of rows.

If you have a million of rows in a grid or drop-down it makes sense to apply some kind
of filter to this huge record set and restrict the number of rows. Just imagine: the user
opens a drop-down and have to choose one row from thousands of other rows.

Regards,

-Andrey

Not Ranked
Posts 12
mbfsjft replied on Mon, May 25 2009 10:22 PM

My customers want to see all of their rows.  These are people who show dogs and are cyberphobic.  If a row is missing from a grid, they wonder if the database is losing rows.

 I need also to search on the sortable column incrementally.  I.e., as you type characters into the search field the grid repositions to the first row that begins with the typed in characters. 

 Tha same is true from the drop-downs for selecting ancestors, that have gender and breed to filter upon.

Top 10 Contributor
Posts 1,644
> My customers want to see all of their rows. These are people who show dogs and are cyberphobic.
> If a row is missing from a grid, they wonder if the database is losing rows.

Data virtualization can be done in the application logic. You can, for example, fetch all the primary
keys at once using the DbDataReader class. Then allow the user to switch pages passing the interval
of primary keys in the WHERE clause of the SELECT statement.

>
> I need also to search on the sortable column incrementally. I.e., as you type characters into the search field
> the grid repositions to the first row that begins with the typed in characters.

Set the FilterBar property to True in C1TrueDBGrid. This doesn't work correctly with C1Data's
virtual mode anyway.

>
> Tha same is true from the drop-downs for selecting ancestors, that have gender and breed to filter upon.

It looks like filtering is not supported in C1TrueDBDropDown. Though you can re-sort the rows in
the drop-down.

>
Page 1 of 1 (6 items) | RSS
Contact ComponentOne: 1.800.858.2739 ©1987-2010 ComponentOne LLC All Rights Reserved.