473,729 Members | 2,405 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

NullReferenceEx ception for System.Data.SQL Client

Hi, there

I got a NullReferenceEx ception when there are more than one users
trying to open the same page at the same time. The senerio is:

Two users logged into the web application using the Windows domain user
account and tried to open the same page which has the databasde query
code. When the two user tried to open the same page at the same time,
there is a runtime error messsage showing as follows:

Server Error in '/reprICEsys' Application.
--------------------------------------------------------------------------------

Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.

Exception Details: System.NullRefe renceException: Object reference not
set to an instance of an object.

Source Error:

An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of
the exception can be identified using the exception stack trace below.
Stack Trace:
[NullReferenceEx ception: Object reference not set to an instance of an
object.]
System.Data.Sql Client.SqlDataR eader.SeqRead(I nt32 i, Boolean
useSQLTypes, Boolean byteAccess, Boolean& isNull) +269
System.Data.Sql Client.SqlDataR eader.SeqRead(I nt32 i, Boolean
useSQLTypes, Boolean byteAccess) +28
System.Data.Sql Client.SqlDataR eader.GetValues (Object[] values) +110
System.Data.Com mon.SchemaMappi ng.LoadDataRow( Boolean
clearDataValues , Boolean acceptChanges) +61
System.Data.Com mon.DbDataAdapt er.FillLoadData Row(SchemaMappi ng
mapping) +155
System.Data.Com mon.DbDataAdapt er.FillFromRead er(Object data, String
srcTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords,
DataColumn parentChapterCo lumn, Object parentChapterVa lue) +260
System.Data.Com mon.DbDataAdapt er.Fill(DataTab le dataTable,
IDataReader dataReader) +90
System.Data.Com mon.DbDataAdapt er.FillFromComm and(Object data, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior) +304
System.Data.Com mon.DbDataAdapt er.Fill(DataTab le dataTable,
IDbCommand command, CommandBehavior behavior) +28
System.Data.Com mon.DbDataAdapt er.Fill(DataTab le dataTable) +88
reprICEsys_Web2 .FinHdrListing. MakeDataset(Str ing RecordSourceStr ,
String SelStrDetail) +186

reprICEsys_Web2 .FinHdrListing. GridClaimsList_ InitializeDataS ource(Object
sender, UltraGridEventA rgs e) +121

Infragistics.We bUI.UltraWebGri d.UltraWebGrid. OnInitializeDat aSource()
+77
Infragistics.We bUI.UltraWebGri d.UltraWebGrid. Control_Load(Ob ject
sender, EventArgs e) +97
System.Web.UI.C ontrol.OnLoad(E ventArgs e) +67
System.Web.UI.C ontrol.LoadRecu rsive() +35
System.Web.UI.C ontrol.LoadRecu rsive() +98
System.Web.UI.C ontrol.LoadRecu rsive() +98
System.Web.UI.P age.ProcessRequ estMain() +750
Does anybody have any idea on how to solve this? Thanks in advance.

Nov 19 '05 #1
2 2781
I would have to see the code to determine exactly what is not being created
(looks like the connection?).

It also appears that you are using an Infragistics DataGrid control, which
may encapsulate some of the data logic. If so, it may be the source of your
error; as I am not that familiar with their controls, I cannot advise on this.

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

*************** ************
Think Outside the Box!
*************** ************
"sxiao" wrote:
Hi, there

I got a NullReferenceEx ception when there are more than one users
trying to open the same page at the same time. The senerio is:

Two users logged into the web application using the Windows domain user
account and tried to open the same page which has the databasde query
code. When the two user tried to open the same page at the same time,
there is a runtime error messsage showing as follows:

Server Error in '/reprICEsys' Application.
--------------------------------------------------------------------------------

Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.

Exception Details: System.NullRefe renceException: Object reference not
set to an instance of an object.

Source Error:

An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of
the exception can be identified using the exception stack trace below.
Stack Trace:
[NullReferenceEx ception: Object reference not set to an instance of an
object.]
System.Data.Sql Client.SqlDataR eader.SeqRead(I nt32 i, Boolean
useSQLTypes, Boolean byteAccess, Boolean& isNull) +269
System.Data.Sql Client.SqlDataR eader.SeqRead(I nt32 i, Boolean
useSQLTypes, Boolean byteAccess) +28
System.Data.Sql Client.SqlDataR eader.GetValues (Object[] values) +110
System.Data.Com mon.SchemaMappi ng.LoadDataRow( Boolean
clearDataValues , Boolean acceptChanges) +61
System.Data.Com mon.DbDataAdapt er.FillLoadData Row(SchemaMappi ng
mapping) +155
System.Data.Com mon.DbDataAdapt er.FillFromRead er(Object data, String
srcTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords,
DataColumn parentChapterCo lumn, Object parentChapterVa lue) +260
System.Data.Com mon.DbDataAdapt er.Fill(DataTab le dataTable,
IDataReader dataReader) +90
System.Data.Com mon.DbDataAdapt er.FillFromComm and(Object data, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior) +304
System.Data.Com mon.DbDataAdapt er.Fill(DataTab le dataTable,
IDbCommand command, CommandBehavior behavior) +28
System.Data.Com mon.DbDataAdapt er.Fill(DataTab le dataTable) +88
reprICEsys_Web2 .FinHdrListing. MakeDataset(Str ing RecordSourceStr ,
String SelStrDetail) +186

reprICEsys_Web2 .FinHdrListing. GridClaimsList_ InitializeDataS ource(Object
sender, UltraGridEventA rgs e) +121

Infragistics.We bUI.UltraWebGri d.UltraWebGrid. OnInitializeDat aSource()
+77
Infragistics.We bUI.UltraWebGri d.UltraWebGrid. Control_Load(Ob ject
sender, EventArgs e) +97
System.Web.UI.C ontrol.OnLoad(E ventArgs e) +67
System.Web.UI.C ontrol.LoadRecu rsive() +35
System.Web.UI.C ontrol.LoadRecu rsive() +98
System.Web.UI.C ontrol.LoadRecu rsive() +98
System.Web.UI.P age.ProcessRequ estMain() +750
Does anybody have any idea on how to solve this? Thanks in advance.

Nov 19 '05 #2


The problem is that I can't make this error happen when I am in my
project in debug mode. What is interesting is that when I right click
the page to refresh the page, the data shows. It seems like it's kind of
conflicting between two users when they open the page at the same time.
But the data is actually loaded but needed to be refreshed.

So I am thinkging about if there is a way (just like I manaully refresh
the page)in my code to refresh the page when the error happens. This is
the alternative solution I can think about if I can't figure out what
exactly happened there.

Any suggestions? Thanks

*** Sent via Developersdex http://www.developersdex.com ***
Nov 19 '05 #3

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

Similar topics

2
1941
by: Shannon | last post by:
I am having a very strange issue with my asp.net application. I have created a datagrid which dynamically gets populated from a person choosing a value from a dropdown list and entering a quantity into a text box (a simple version of a shopping cart). When I run/debug the web page using the localhost in the page URL (http://localhost/mypage.aspx), the datagrid updates properly when a command button is clicked and all is well. However,...
0
9776
by: muralidharan | last post by:
WebForm1.aspx Code: <%@ Register TagPrefix="ComponentArt" Namespace="ComponentArt.Web.UI" Assembly="ComponentArt.Web.UI" %> <ComponentArt:TreeView id="TreeView1" Height="520" AutoPostBackOnNodeMove="false" DragAndDropEnabled="true" NodeEditingEnabled="False" KeyboardEnabled="true" CssClass="TreeView" NodeCssClass="TreeNode" SelectedNodeCssClass="SelectedTreeNode" HoverNodeCssClass="HoverTreeNode" NodeEditCssClass="NodeEdit"
17
9689
by: Rodusa | last post by:
I am getting this exception error which is driving me nuts. System.NullReferenceException - Object reference not set to an instance of an object If I comment this line, I don't get any errors: string Total_Dollar_Amount = GetTotal(sql,"test"); namespace SalesReport
2
4587
by: Chris Langston | last post by:
I have a Web Server running IIS 5 or 6 on Windows 2K and Windows 2003 Server that is experiencing strange shutdown problems. We are using ASP.NET v1.1 and our application is written in VB.NET Here's the scenario: 1. .NET Windows Client on a remote machine makes a web service call to update tables on a Web Server running SQL Server 2000. 2. The Update is updating about 1000 - 3000 records doing simple update statements like "Update...
3
4149
by: Patrick.O.Ige | last post by:
I'm loading an Array below but getting the error "Object reference not set to an instance saying 'ItemNumber = CType(Args.Item.FindControl("ItemNumber"), TextBox).Text' is the error line. I DON'T KNOW WHAT I'M DOING WRONG I USED ASP.NETWebMatrix and its working well!! Any help!! I have declared ItemNumber as u can see below " :-
6
7219
by: Chuck | last post by:
I created a VB.net app that opens a current excel workbook, puts some data in it and saves it. This works fine on all XP machines. But I am getting an error on win 98 machines. here a portion of the code... Imports System Imports System.Data
0
2610
by: buttslapper | last post by:
Hi, Recently we discovered in our production server this kind of exception : We are wondering what causes the transaction to be zombied, and why do we get a nullreferenceexception in this method ? As you will see in the call stack, at every 5 minutes (timer), we are inserting data in a transaction. In a day, we can have 2-3 occurence of this problème.
1
3166
by: Pedro Dinis | last post by:
i have this class library that connects to the database(see appconfig below) compiling 0 errors but when its running i amhaving this error An unhandled exception of type 'System.NullReferenceException' occurred in my_deepot_common.dll Object reference not set to an instance of an obj int this line public System.Data.SqlClient.SqlConnection user_connection = new
3
2477
by: Sagar | last post by:
Hi. I am working on a project to migrate a web application from 1.1 to 2.0 Within in the DAL of the application, there is a call to below function that builds a command object for later use. Inside this function iam getting a runtime error when the command object calls the prepare method.
0
8763
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9427
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9284
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
6722
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6022
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4796
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3238
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2683
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2165
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.