By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,515 Members | 1,339 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,515 IT Pros & Developers. It's quick & easy.

SLOW ddlistbox loading

P: n/a
I've used ddlistboxes before and had no problem but this one loads on the page load event and then takes a VERY long time to display. There are about 2000 records. Can anybody offer some advice on how i can make it more effiecent and speed up the process. I've tested the sql statement on the server and it works fine. Have a look and feel free to comment

ti

If Not IsPostBack The
Dim ds As New DataSe
Dim MyCommand As SqlDataAdapte
Dim strstg As String = "select * from dbo.vw_Subdivisions
MyCommand = New SqlDataAdapter(strstg, dbconn
MyCommand.Fill(ds, "propownerstbl"
cbosubdivision.DataTextField = ("sbd_desc"
cbosubdivision.DataValueField = ("sbd_desc"

cbosubdivision.DataSource = ds.Tables("propownerstbl"
cbosubdivision.DataBind(
cbosubdivision.Items(0).Text = "Select subdivision or T/R
dbconn.Close(
End If
Nov 22 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Cor
Hi John,

Why you do
Dim strstg As String = "select * from dbo.vw_Subdivisions"
if you are using only the field sbd_desc? and not
"select sbd_desc from dbo.vw_Subdivisions"
MyCommand = New SqlDataAdapter(strstg, dbconn)
MyCommand.Fill(ds, "propownerstbl")
cbosubdivision.DataTextField = ("sbd_desc")
cbosubdivision.DataValueField = ("sbd_desc")

cbosubdivision.DataSource = ds.Tables("propownerstbl")
cbosubdivision.DataBind()
cbosubdivision.Items(0).Text = "Select subdivision or T/R"
dbconn.Close()
End If

Nov 22 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.