DataTable.Select not unique among users??

K

Kris Rudin

I am displaying a table of information on a web page, using an asp:table
that I populate dynamically. On this page I give the user the options to
group the rows by certain fields, and/or filter the contents on certain
fields. The grouping/filtering is "remembered" for each user via a cookie.

The problem is works like this:
User A applies a filter on Project Manager.
User B filters by Department.
User B groups by Project Manager (NOTE - this is the key - they are grouping
by what user A filters on)
When the page refreshes, User B's table correctly grouped by Project
manager, but is also FILTERED by project manager (even tho user B's cookie
correctly says filter by department).

Is DataTable.select NOT unique between separate users?? Or is asp:table not
unique??

Here's how I build things:

I have a dataview object that I populate from 2 different databases.
I then read the user's cookies for filtering and grouping.
I then create and popluate a DataTable using DataView.Table.
I then apply the filter/grouping on the DataTable using
DataTable..Select(filterBy,groupBy)
I then populate the asp:table row by row, with the proper grouping/filter.

This all works just fine (grouping/filtering) with a single user using the
web site. However, as described above, it appears that one user's filter
settings are getting applied to a subsequent user. (We can replicate this at
will.)

This doesn't seem to be a problem with grouping, just filtering. (That is,
User A's grouping is not getting applied to User B, just the filtering)

Can someone help me understand what is going on? Shouldn't each user be in
their own IIS session, with their own objects? It appears that either the
DataTable, or the asp:table are being shared across sessions, which I just
don't understand.

Any help at all would be most appreciated!

Thanks!
 
F

Frank Wilson

Kris,

What does your database logic look like (stored proc,
etc.)? Are you using any temp tables or global temp
tables? Is it a SQL Server backend?

Server controls are instantiated for each request to the
page, but connections to your database are pooled by
default. If you have any database objects that are tied
to the connection, it is possible that one user might
create them and another user might use them.

Just a thought.

Frank
 
K

Kris Rudin

Frank,

Good thoughts.

I do a straight SQL query to populate the dataview object, initially. This
is done onPageLoad, regardless of PostBack or not. The SQL query just gets
EVERYTHING. Then I do the process I outlined, where I create the DataTable
from the DataView.Table, read the cookies, and then apply the
filtering/grouping in the select method of the DataTable object. Lastly I
build the asp:table from the rows returned from the DataTable.select().

Since the SQL query is not grouping/filtering, I'm not sure this is the
problem. I am filtering/grouping on the datatable, not when I first create
the DataView using the SQL query.

Any other thoughts?

Kris
 

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,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top