This question is locked. New answers and comments are not allowed.
Hello, I've been experiencing some issues when a RadGrid (or Gridview) is bound to an OpenaccessDataSource.
I'm binding a RadGrid to a View through the commandText property on the OpenaccessDataSource. This part is working just fine, however when I want to search through the view for specific entries the perfomance of the OpenaccessDataSource drops a lot. A query which should take 2-3 seconds takes from 5-6 seconds up to 190 seconds where the rebind command times out and the grid isn't updated. I've tried to set up timers similar to the example using a linqdatasource with a large database found here:
http://demos.telerik.com/aspnet-ajax/grid/examples/performance/linq/defaultcs.aspx
When I do this, the recieving part of the query takes the 2-3 seconds like it should, but the proccess in total takes the before mentioned 5/6-190 seconds. I've found that the longer it is between each query the longer the command takes.
I've tried binding the OpenaccessDataSource to a regular asp:gridview, however this results in the same thing.
To test whether it was the OpenaccessDataSource causing the issues, I tried binding the grid to a regular SqlDataSource instead. When I did that the total time required to rebind dropped to the expected 2-3 seconds.
What I'd like to know is how/if I can get the OpenaccessDataSource to behave in the same way as the SqlDataSource in terms of performance, as I'd prefer not to mix regular Sql with Openaccess.
Below is the implementation of my OpenaccessDataSource and the Rebinding:
I'm binding a RadGrid to a View through the commandText property on the OpenaccessDataSource. This part is working just fine, however when I want to search through the view for specific entries the perfomance of the OpenaccessDataSource drops a lot. A query which should take 2-3 seconds takes from 5-6 seconds up to 190 seconds where the rebind command times out and the grid isn't updated. I've tried to set up timers similar to the example using a linqdatasource with a large database found here:
http://demos.telerik.com/aspnet-ajax/grid/examples/performance/linq/defaultcs.aspx
When I do this, the recieving part of the query takes the 2-3 seconds like it should, but the proccess in total takes the before mentioned 5/6-190 seconds. I've found that the longer it is between each query the longer the command takes.
I've tried binding the OpenaccessDataSource to a regular asp:gridview, however this results in the same thing.
To test whether it was the OpenaccessDataSource causing the issues, I tried binding the grid to a regular SqlDataSource instead. When I did that the total time required to rebind dropped to the expected 2-3 seconds.
What I'd like to know is how/if I can get the OpenaccessDataSource to behave in the same way as the SqlDataSource in terms of performance, as I'd prefer not to mix regular Sql with Openaccess.
Below is the implementation of my OpenaccessDataSource and the Rebinding:
<
telerik:OpenAccessDataSource
ID
=
"OpenAccessDataSource1"
runat
=
"server"
EnableDelete
=
"false"
EnableInsert
=
"false"
EnableUpdate
=
"false"
ObjectContextProvider
=
"WuptiCRM.wupti_crm.DTO.ObjectScopeProvider1, WuptiCRM.wupti_crm.DTO"
CommandText
=
"SELECT * FROM PurchaseOrderViewExtent order by created desc"
>
</
telerik:OpenAccessDataSource
>
OpenAccessDataSource1.CommandText =
string
.Format(
"SELECT * FROM "
+ view +
" WHERE "
+ filterExpression +
" and (trackingNumber like '{0}' or SoldToName like '{0}' or SoldToEmail like '{0}' or ContactPhoneNumber like '{0}' or Address like '{0}' or Address2 like '{0}') order by Created desc"
, searchString.Replace(
"*"
,
"%"
));
OrderGrid.CurrentPageIndex = 0;
OrderGrid.Rebind();