Empty dataset with multiple requests

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

When I have two users click a button with 1 sec of each other, one of the
users is returned an empty dataset, resulting in a 'no row at position 0
error'.

Here is an obfuscated snippet:

Dim objCustomerFacade As New CustomerFacade()
Dim Customer As New TypedDataset
Customer = objCustomerFacade.Login(Username, Password)
With Customer
Me.AccountId = CType(.CUSTOMER_TABLE(0).ACCOUNT_ID, Integer)
End With

Me.AccountId is a public property defined in my custom page base class,
which inherits from System.Web.UI.Page. CustomerFacade is a class between the
UI and the data layer.

I am using the 1.0 framework. Any thoughts are appreciated. I've been
leaning toward a threading problem, but datasets are thread safe aren't they?
 
Based on what little you have given me, I would look and see if you are
running exclusive locks on the database that populates your "facade" object.
Very common if you are using Access, but possible with other databases.

---

Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************
 
Back
Top