?Sequential Fetch Mode? + DevExpress Grid PROBLEM.

?Sequential Fetch Mode? + DevExpress Grid PROBLEM.

Postby Tatyana » Fri 08 May 2009 14:36

Dear Devart Suppot Team, we have some problems ?Sequential Fetch Mode? used with DevExpress Grid.

We want: "When client needs to fetch more records (for example, user scrolls a grid), another request to server is performed."

We use Devart 5.0.1.0 with DevExpress Grid v8.3.

we want to use ?Sequential Fetch Mode?, so we done everything as described in documentation. We created a typed dataset and a tables in it. We set tables properties in order to use ?Sequential Fetch Mode?.
dataset1.table1.FetchAll = false;//by default
dataset1.table1.QueryRecordCount = true;
dataset1.table1.MaxRecords = 0; //by default

I do:
calling dataset1.table1.active = true;

I see:
1) dataset1.table1.RecordCount = 1383
dataset1.table1.Rows.Count = 1103
2) The sql text (SelectCommand.CommandText) of this table executed in SQLNavigator returns 1383 rows.

Question 1 : why so many records retrieved at once in the beginning? It slows down the functionality very much =(


In another example
I do:
calling dataset1.table2.active = true;
I see:
1) dataset1.table1.RecordCount = 1478
2) dataset1.table1.Rows.Count = 1478

Question 2: why all records are fetched??? All records are fetched!

I do:
calling dataset1.table1.active = true;
I?m on the first record. Grid shows the number of records 1383 (Rows.Count = 1103 RecordCount = 1383). I start scrolling through the records in the grid. When I reach record number 1280 the grid shows that the number of records is 1381 (Rows.Count = 1381 RecordCount = 1381). That? it. I see only 1381 record in the grid. But really there are 1383 records should be.

Question 3: Why it finally shows wrong number of records.

I do:
calling dataset1.table1.active = true;
I?m on the first record. Grid shows the number of records 1383 (Rows.Count = 1103 RecordCount = 1383). I open the filter (the pop up list of all values of some column). As far as I understand now all records should be fetched by the grid in order to form distinct list of values of this column. What I see after this action is Rows.Count = 1381 RecordCount = 1381. Again the same problem as in the previous example.

Question 4: Why it finally shows wrong number of records.

Is there some special things that I should check?
________
Lenders Mortgage Insurance Advice
Last edited by Tatyana on Thu 24 Feb 2011 22:45, edited 1 time in total.
Tatyana
 
Posts: 17
Joined: Mon 08 Sep 2008 14:01

I am also using DevExpress

Postby degas » Fri 08 May 2009 15:29

Tatyana

Hi, i am also using DevExpress components and i am having problems with the XtraGrid. I cannot seem to make it work with the Embbedded Navigator. The records get selected but when i press "end edit", the changes are not posted.
Could you please give me a simple example? I really need help over here.

Thanks a lot
degas
 
Posts: 77
Joined: Mon 16 Feb 2009 18:36
Location: Argentina

Postby degas » Fri 08 May 2009 18:56

Tatyana

I have managed to update the record but i have to write an eventhandler for the EmbeddedNavigator_ButtonClick event?


Code: Select all
private void gridControl1_EmbeddedNavigator_ButtonClick(object sender, NavigatorButtonClickEventArgs e)
        {
            if(e.Button.ButtonType == NavigatorButtonType.EndEdit)odsGasoducto.Update();
        }



Do you have to do the same?
Thanks
degas
 
Posts: 77
Joined: Mon 16 Feb 2009 18:36
Location: Argentina

Re: I am also using DevExpress

Postby Tatyana » Tue 12 May 2009 09:26

degas wrote:The records get selected but when i press "end edit", the changes are not posted.


This is correct. Help for EndEdit Button of the EmbeddedNavigator says: "... the button used to post the edited record to the associated datasource." So it posts data to the datasource (oracle table), but not to the server.
________
Mywebcamhookup
Last edited by Tatyana on Thu 24 Feb 2011 22:46, edited 1 time in total.
Tatyana
 
Posts: 17
Joined: Mon 08 Sep 2008 14:01

solved

Postby degas » Tue 12 May 2009 15:49

Thanks for answering my question.

I have managed to post the changes to the db, by setting the CacheUpdates to false. This way any change, gets posted to the underlaying database? I think this is not the default behaviour but this is the only one that worked for me.
I read the help and you are rigth, so how do you post the data to the database?
This is my first WinForms project but i have a lot of experience in ASPNet and DevArtLinq, so feel free to ask me, i will be more than happy to help you
my mail is pablo.szittyay@szicom.com.ar
degas
 
Posts: 77
Joined: Mon 16 Feb 2009 18:36
Location: Argentina

Dear Devart Team

Postby Tatyana » Thu 14 May 2009 08:55

Sorry, what about my questions about Sequential Fetch Mode?

It is a bug?
________
CROP INSURANCE FORUM
Last edited by Tatyana on Thu 24 Feb 2011 22:46, edited 1 time in total.
Tatyana
 
Posts: 17
Joined: Mon 08 Sep 2008 14:01

Postby Shalex » Thu 14 May 2009 12:26

1. The number of rows retrieved in the beginning is defined by the control you use. If DevExpress Grid requests the 1103 record, we give this record to it with all previous records from the table.

2. This is the same issue. For example, System.Windows.Forms.DataGrid (not DataGridView) requests all records always. This behaviour is a control stuff.
Does this problem persist with the System.Windows.Forms.DataGridView control?

3. Probably, this problem is caused by the different (1383 and 1381) results obtained from the [select count(*)...] and [select * ...] commands. The first command is used to get the RecordCount value, the second is used by the reader that fetches the records from the database. Please use the OracleMonitor component to find these commands in your case (please post them). It should help to clarify the situation.
Shalex
Devart Team
 
Posts: 7343
Joined: Thu 14 Aug 2008 12:44


Return to dotConnect for Oracle