473,513 Members | 2,428 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Sporadic Error: Cannot find table 0

The application is developed in ASP.Net with a SQL Server database.

Essentially, the application uses a single shared Connection object for
all users logged into the system. The connection object is
opened/closed for each transaction.

The error - System.IndexOutOfRangeException: Cannot find table 0 -
occurs on one page that accepts a single piece of data from a textbox.
This data is then passed to the business logic classes (in VB.Net) and
is queried against the database.

According to the stack trace, the error occurs at:
System.Data.DataTableCollection.get_Item(Int32 index) +79

Out of 100 data entries, this error will appear once or twice. Note
also that when the user enters the same piece of data that caused the
initial run-time error, the second entry executes OK!
Any suggestions?

Thanks:

Pat

Nov 21 '05 #1
1 8759
It's b/c there's no table 0. You should check before hand

Debug.Assert(dataSet.tables[0] != null && dataSet.Tables.Count > 0); or some
similar logic. You may also be causing problems b/c of your connection
strategy - if it's the same connection object and 20 people run a command -
that may give you some problem. However if you're timing out or having a
similar problem, you should be throwing an exception somewhere - I'd look to
your exception handlers to make sure you're not eating an exception somwhere
and not realizing it.

--
W.G. Ryan MVP (Windows Embedded)

TiBA Solutions
www.tibasolutions.com | www.devbuzz.com | www.knowdotnet.com
"POL8985" <po*****@njit.edu> wrote in message
news:11*********************@f14g2000cwb.googlegro ups.com...
The application is developed in ASP.Net with a SQL Server database.

Essentially, the application uses a single shared Connection object for
all users logged into the system. The connection object is
opened/closed for each transaction.

The error - System.IndexOutOfRangeException: Cannot find table 0 -
occurs on one page that accepts a single piece of data from a textbox.
This data is then passed to the business logic classes (in VB.Net) and
is queried against the database.

According to the stack trace, the error occurs at:
System.Data.DataTableCollection.get_Item(Int32 index) +79

Out of 100 data entries, this error will appear once or twice. Note
also that when the user enters the same piece of data that caused the
initial run-time error, the second entry executes OK!
Any suggestions?

Thanks:

Pat

Nov 21 '05 #2

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

Similar topics

0
1719
by: Svetlana Syrkin | last post by:
Sporadically, our clients receive "page cannot be displayed" error. Failure does not occur at the same line, but error code and description are always the same: Microsoft VBScript runtime...
0
400
by: Matthew Louden | last post by:
I am trying to implement the sort event in data grid. I set the data grid's AllowSorting property = True. I implement the following code that should be the event will fire when the user click any...
1
2772
by: Travis | last post by:
I have state server running on my webserver. It works fine MOST of the time but frequently I get this error while it is running Error Message: Unable to make the session state request to the...
3
4249
by: POL8985 | last post by:
The application is developed in ASP.Net with a SQL Server database. Essentially, the application uses a single shared Connection object for all users logged into the system. The connection...
3
1309
by: sameer | last post by:
Hi All, i have an asp.net application which has got sql server 2000 behind the scenes. Very simple application, all it does is extract the data from the databse and display it in the grid. But...
0
1209
by: Petemo94 | last post by:
Folks, I am getting a "sporadic" exception that contains the following stack trace. I say sporadic b/c my DB connection usually works fine, but occasionally it fails. *** I also noted that...
3
2871
by: Michel Couche | last post by:
Hello, I have an ASP.Net application that uses the Wizard control to build a newsletter. There are three steps in the wizard. The customer's specific design data are loaded from a database in...
1
2010
by: Stefan Braumeister | last post by:
Hi NG, I got some difficult problem that drives me nuts. I wrote a relatively simple extension that reads binary files and extracts some data. If I call the script, that uses my extension via...
3
1623
by: Daniel Rindt | last post by:
Hello List, i hope to find an answer here, my problem is that my Webserver sporadic offers php scripts for download. I search with google and find some issues belonging to php version 4.x and...
10
6933
by: happyse27 | last post by:
Hi All, I got this apache errors(see section A1 and A2 below) when I used a html(see section b below) to activate acctman.pl(see section c below). Section D below is part of the configuration...
0
7384
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7537
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...
0
5685
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5086
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4746
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3233
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3222
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
799
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
456
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.