473,324 Members | 2,313 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

SLOW ddlistbox loading

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
1 1079
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Philipp K. Janert, Ph.D. | last post by:
Dear All! I am trying to load a relatively large table (about 1 Million rows) into an sqlite table, which is kept in memory. The load process is very slow - on the order of 15 minutes or so. ...
4
by: Adrian MacNair | last post by:
Hi, I created an image gallery which displays 63 images in a slideshow. The problem is that the show was slow because each image loaded one at a time during the show. No problem right? I just...
5
by: Kurt Bauer | last post by:
I have an ASP group calendar application which pulls calendar data from Exchange via webdav into an XML string. I then loop the XML nodes to populate a collection of appointments. Finally I use...
7
by: Charles | last post by:
I have Visual Studio 6.0 stand-alone (with C++) and as part of Compaq Visual Fortran 6.6c. I am moving my development from a Win 98 SE machine w/2x 10 Gb HDD (each w/ 1Gb free), 768 Mb RAM to a...
0
by: Simon | last post by:
I have W2K and SQL server on one computer. I have a problem with pages which are accessing the database in Page_Load method. When I load pages locally they are loading fast, but when I am accessing...
6
by: B B | last post by:
Okay, here is what's happening: I have a reasonably fast laptop (1.4 GHz Mobile M, so comparable to 2.5GHz P4) doing .net development. Running Windows XP pro, SP2 IIS is installed and running...
5
Coldfire
by: Coldfire | last post by:
I am having problem with slow crystal report loading plus slow dataadapter.fill method here is my code string SelectCmd = "SELECT * FROM EnterInstituteInformation WHERE...
5
by: =?Utf-8?B?V2FubmFiZQ==?= | last post by:
We have a page that is loading very slow. There is not a lot of data, not a lot of users are connected at the same time and the page does not produce an error, so I am not sure where to start to...
10
by: penworthamnaynesh | last post by:
Does php slow your website down? This is what i would like to know.The reason is because my site is writtent 50% in html and 50% in php and is very slow at loading. And i cant tell wether php is...
39
by: cm_gui | last post by:
Python is slow. Almost all of the web applications written in Python are slow. Zope/Plone is slow, sloow, so very slooow. Even Google Apps is not faster. Neither is Youtube. Facebook and...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.