Click to See Complete Forum and Search --> : Vb Script ASP
Amendra
February 18th, 2000, 03:13 AM
I am using visual interdev and vb script for ASP programming...When I use a design time control drop down list box(Combo Box) on the ASP page from the Interdev toolbox.I have about 900 records in a(SQL Server database) table and have assigned a field to the list box and it takes a long time for the page to load it in the browser.Please I want a solution to lessen the time
February 18th, 2000, 09:45 AM
Hello,
if you are using ADO for this, then try by OLEDB provider for SQL Server your performance will automatically get better.
otherwise use disconnected recordset.
Best of Luck
if your problem does not get solved by this along with performance.
then reply me at :
singh_vs@hotmail.com
Johnny101
February 18th, 2000, 11:48 AM
your probably better off not "binding" the combo box across the web. just manually get the recordset and in a loop build the html to build the combo box. it couldn't hurt.
Sub FillCombo()
dim sql
dim rs
dim cn
dim str
set cn = server.createobject("adodb.connection")
set rs = server.createobject("adodb.recordset")
cn.open sConnectionString
sql = "SELECT Field1 FROM database..table (nolock) WHERE blah = stuff"
set rs = cn.execute(sql)
if not rs.eof then
str = "<select name='MyName'>"
while not rs.eof
str = str & "<option value='" & rs(0) & "'>" & rs(0) & "</option>" & vbcrlf
rs.movenext
wend
rs.close
end if
set rs = nothing
cn.close
set cn = nothing
response.write str
that will build a drop down box of all records in your table. it will send the html down to the browser pretty, once it's there, it's up to the browser to interprit the html and build the visual objects.
hope this helps,
john
John Pirkey
MCSD
www.ShallowWaterSystems.com
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.