473,385 Members | 1,712 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,385 software developers and data experts.

Empty dataset with multiple requests

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?
Nov 19 '05 #1
1 835
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!
***************************
"ghause" wrote:
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?

Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Ohaya | last post by:
Hi, I'm trying to understand a situation where ASP seems to be "blocking" of "queuing" requests. This is on a Win2K Advanced Server, with IIS5. I've seen some posts (e.g.,...
39
by: fleemo17 | last post by:
I'm wondering whether it's better to leave an alt tag blank (alt=" ") or specify something like "alt='spacer'" when referring to objects that merely help the layout of the page? -Fleemo
10
by: localhost | last post by:
I have a static, thread-safe class with a DataSet as a property. When the class is instanced into an object, some callers add rows to a DataTable in the DataSet. Other callers read the DataSet. ...
9
by: Abhishek Srivastava | last post by:
Hello All, In IIS 6.0 We have a concept of worker processes and application pools. As I understand it, we can have multiple worker process per appliction pool. Each worker process is dedicated...
1
by: Nikhil Patel | last post by:
Hi all, If I want to access the contents of a DataSet in multiple ASP.Net form requests without manually saving it in Cache, do I have to add the DataSet to the form at design time or can I just...
1
by: Adam Knight | last post by:
Hi all, A couple of quick questions relating to datasets: Is one dataset in a given page generally used to bind all controls to db data? If a dataset object is to be used globally by all,...
7
by: Dabbler | last post by:
I'm using an ObjectDataSource with a stored procedure and am getting the following error when trying to update (ExecuteNonQuery): System.Data.SqlClient.SqlException: Procedure or Function...
35
by: keerthyragavendran | last post by:
hi i'm downloading a single file using multiple threads... how can i specify a particular range of bytes alone from a single large file... for example say if i need only bytes ranging from...
4
by: Marek Kubica | last post by:
Hi, I am trying to get this stuff working, but I still fail. I have a format which consists of three elements: \d{4}M?-\d (4 numbers, optional M, dash, another number) EMPTY (the <EMPTYtoken)...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.