M
Mick Walker
I am in the process of writing a web application using ASP.NET. I am
Using a SqlDataSource to populate the contents of a Repeater control.
To me the select statement appears to be very very simple, it is:
SELECT [UID], [SupplierSKUCode], [Date_Imported], [Name], [Import_UID]
FROM [Import_Lines] WHERE (([Import_UID] = @Import_UID) AND
([LinkedSKUUID] IS NULL)) ORDER BY [Date_Imported]
Yet it takes 5 Mins plus to bind the data source to the repeater
control. The statement will only ever return < 1500 results due to the
database logic within the DB.
I simply cant understand why it would take so long to bind these items
to a repeater. My Repeater is defined as follows:
<asp:Repeater ID="Repeater1" runat="server">
<HeaderTemplate><table cellpadding="5"
cellspacing="2" width="90%"><tr class="TableCaptions">
<td>Supplier SKU Code</td>
<td>Date Imported</td>
<td>Name</td>
<td>Manual SKU Input</td>
<td>Ignore</td>
<tr />
</HeaderTemplate>
<ItemTemplate>
<tr class="AlternatingRowStyle">
<td align="left" valign="top"><asp:Label
ID="lblSupSKU" runat="server" Text='<%# Eval("SupplierSKUCode")
%>'></asp:Label></td>
<td align="left" valign="top"><asp:Label
ID="lblDate" runat="server" Text='<%# Eval("Date_Imported")
%>'></asp:Label></td>
<td align="left" valign="top"><asp:Label
ID="lblName" runat="server" Text='<%# Eval("Name") %>'></asp:Label></td>
<td align="left" valign="top">
<radC:RadComboBox
ID="RadComboSKU"
runat="server"
Skin="WindowsXP"
MarkFirstMatch="True"
Height="150px"
EnableLoadOnDemand="True"
ExternalCallBackPage="ComboStreamer.aspx" />
</td>
<td align="left" valign="top">
<asp:RadioButtonList ID="RBIgnore"
runat="server">
<asp:ListItem>Ignore
Once</asp:ListItem>
<asp:ListItem>Ignore
Forever</asp:ListItem>
</asp:RadioButtonList><asp:TextBox
ID="txtLineID" runat="server" Text='<%# Eval("UID")%>'></asp:TextBox>
</td>
</tr>
</ItemTemplate>
<AlternatingItemTemplate>
<tr class="AlternatingRowStyle">
<td align="left" valign="top"><asp:Label
ID="lblSupSKU" runat="server" Text='<%# Eval("SupplierSKUCode")
%>'></asp:Label></td>
<td align="left" valign="top"><asp:Label
ID="lblDate" runat="server" Text='<%# Eval("Date_Imported")
%>'></asp:Label></td>
<td align="left" valign="top"><asp:Label
ID="lblName" runat="server" Text='<%# Eval("Name") %>'></asp:Label></td>
<td align="left" valign="top">
<radC:RadComboBox
ID="RadComboSKU"
runat="server"
SKin="WindowsXP"
MarkFirstMatch="True"
Height="150px"
EnableLoadOnDemand="True"
ExternalCallBackPage="ComboStreamer.aspx" />
</td>
<td align="left" valign="top">
<asp:RadioButtonList ID="RBIgnore"
runat="server">
<asp:ListItem>Ignore
Once</asp:ListItem>
<asp:ListItem>Ignore
Forever</asp:ListItem>
</asp:RadioButtonList>
<asp:TextBox ID="txtLineID"
runat="server" Text='<%# Eval("UID")%>'></asp:TextBox>
</td>
</tr>
</AlternatingItemTemplate>
</asp:Repeater>
I set the repeaters datasource programatically through my code, to point
to my SqlDataSource.
Does anyone know why it taked to long to DataBind() to the repeater control?
Kind Regards
Mick Walker
Using a SqlDataSource to populate the contents of a Repeater control.
To me the select statement appears to be very very simple, it is:
SELECT [UID], [SupplierSKUCode], [Date_Imported], [Name], [Import_UID]
FROM [Import_Lines] WHERE (([Import_UID] = @Import_UID) AND
([LinkedSKUUID] IS NULL)) ORDER BY [Date_Imported]
Yet it takes 5 Mins plus to bind the data source to the repeater
control. The statement will only ever return < 1500 results due to the
database logic within the DB.
I simply cant understand why it would take so long to bind these items
to a repeater. My Repeater is defined as follows:
<asp:Repeater ID="Repeater1" runat="server">
<HeaderTemplate><table cellpadding="5"
cellspacing="2" width="90%"><tr class="TableCaptions">
<td>Supplier SKU Code</td>
<td>Date Imported</td>
<td>Name</td>
<td>Manual SKU Input</td>
<td>Ignore</td>
<tr />
</HeaderTemplate>
<ItemTemplate>
<tr class="AlternatingRowStyle">
<td align="left" valign="top"><asp:Label
ID="lblSupSKU" runat="server" Text='<%# Eval("SupplierSKUCode")
%>'></asp:Label></td>
<td align="left" valign="top"><asp:Label
ID="lblDate" runat="server" Text='<%# Eval("Date_Imported")
%>'></asp:Label></td>
<td align="left" valign="top"><asp:Label
ID="lblName" runat="server" Text='<%# Eval("Name") %>'></asp:Label></td>
<td align="left" valign="top">
<radC:RadComboBox
ID="RadComboSKU"
runat="server"
Skin="WindowsXP"
MarkFirstMatch="True"
Height="150px"
EnableLoadOnDemand="True"
ExternalCallBackPage="ComboStreamer.aspx" />
</td>
<td align="left" valign="top">
<asp:RadioButtonList ID="RBIgnore"
runat="server">
<asp:ListItem>Ignore
Once</asp:ListItem>
<asp:ListItem>Ignore
Forever</asp:ListItem>
</asp:RadioButtonList><asp:TextBox
ID="txtLineID" runat="server" Text='<%# Eval("UID")%>'></asp:TextBox>
</td>
</tr>
</ItemTemplate>
<AlternatingItemTemplate>
<tr class="AlternatingRowStyle">
<td align="left" valign="top"><asp:Label
ID="lblSupSKU" runat="server" Text='<%# Eval("SupplierSKUCode")
%>'></asp:Label></td>
<td align="left" valign="top"><asp:Label
ID="lblDate" runat="server" Text='<%# Eval("Date_Imported")
%>'></asp:Label></td>
<td align="left" valign="top"><asp:Label
ID="lblName" runat="server" Text='<%# Eval("Name") %>'></asp:Label></td>
<td align="left" valign="top">
<radC:RadComboBox
ID="RadComboSKU"
runat="server"
SKin="WindowsXP"
MarkFirstMatch="True"
Height="150px"
EnableLoadOnDemand="True"
ExternalCallBackPage="ComboStreamer.aspx" />
</td>
<td align="left" valign="top">
<asp:RadioButtonList ID="RBIgnore"
runat="server">
<asp:ListItem>Ignore
Once</asp:ListItem>
<asp:ListItem>Ignore
Forever</asp:ListItem>
</asp:RadioButtonList>
<asp:TextBox ID="txtLineID"
runat="server" Text='<%# Eval("UID")%>'></asp:TextBox>
</td>
</tr>
</AlternatingItemTemplate>
</asp:Repeater>
I set the repeaters datasource programatically through my code, to point
to my SqlDataSource.
Does anyone know why it taked to long to DataBind() to the repeater control?
Kind Regards
Mick Walker