Datalist and Multiple DS objects

G

Guest

I have a website that performs a search on an indexing service and returns
the results. During the initial load, I get the recordcount through a DS,
then bind a DataList using a second DS with page count of 20.

This site executes successfully on my local machine and indexing service.
When ran on the intended server, the app retrieves the record count, then
binds the data in the 2nd DS, but doesn't display the records bound to the
DataList. When a user goes to the 2nd page, the results will display. If I
remove the initial recordcount DS, the results are displayed fine. The code
is simple and is abbr below:

Dim CN as New OleDB.Connection("Provider=MSIDXS.1;Data Source=HDSN-Standard")
Dim DA as New OleDBDataAdapter("Select filename From Scope()",CN)
Dim RC as Integer = 0

Dim DS1 as New DataSet
Dim DS2 as New DataSet
DA.Fill(DS1,"RecordCount")
RC = DS1.Tables("RecordCount").Rows.Count
DS1.Dispose()
DA.Fill(DS2,CurrentIndex,PAGE_SIZE,"Results")
DataList1.DataSource = DS2
DataList1.DataBind

I simplified the code, but it works in full on my local machine, but not on
the initial search on the server. In order to start viewing the results on
the server, you must proceed to another page. At that time, you can then go
back to the first page to view results 1 - 20.

I've tried placing code in classes, seperate functions returned by Booleans,
time delays, but nothing works. It almost looks like the code runs to quick
for the data to bind, but if I take out the DS1, it all works fine.

Please help with ideas.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top