From: "Jon Paal" Jon[ nospam ]Paal @ everywhere dot on 22 Oct 2006 18:25 getting more errors --- now showing "aspnet_wp.exe (PID#) stopped unexpectedly." Event Type: Error Event Source: ASP.NET 2.0.50727.0 Event Category: None Event ID: 1000 Date: 10/22/2006 Time: 2:58:57 PM User: N/A Computer: ************* Description: aspnet_wp.exe (PID#) stopped unexpectedly. "Mark Fitzpatrick" <markfitz(a)fitzme.com> wrote in message news:eZ6Hhah9GHA.1172(a)TK2MSFTNGP03.phx.gbl... > Why don't you try to test the DBReader to see if it's null before setting the datasource to it. That may give you an idea of > whether or not it is actually returning any results. That's one of the key things to keep in mind when depending upon any > variable, you have to test to ensure it isn't null before it's manipulated or consumed in some fashion. If you're testing to see > if it's null first, then you could trap the null and handle it gracefully without receiving the error. > > -- > Hope this helps, > Mark Fitzpatrick > Former Microsoft FrontPage MVP 199?-2006 > > "Jon Paal" <Jon[ nospam ]Paal @ everywhere dot com> wrote in message news:Ol$us1f9GHA.3384(a)TK2MSFTNGP05.phx.gbl... >> but the page renders as expected.... >> The page trace shows no errors on the page. >> >> The error message appears well after all is completed. >> >> == code ===== >> Dim users as New DBClass >> DisplayGrid.DataSource=users.Return_Reader("SELECT name, email FROM users_profile") >> DisplayGrid.DataBind() >> >> Public Class DBClass >> Function Return_Reader(ByVal strSQL As String) >> ... >> DBReader = Query.ExecuteReader(system.data.CommandBehavior.CloseConnection) >> Return DBReader >> end functon >> end class >> >> >> "Mark Fitzpatrick" <markfitz(a)fitzme.com> wrote in message news:OrBtWnf9GHA.3344(a)TK2MSFTNGP03.phx.gbl... >>> Check the trace log for the web app to see if more detailed info is there. Without knowing your code exactly, here's a possible >>> scenario. You have a function or block of code that fetches the datareader. For some reason the database code bombs out and >>> leaves a datareader that's not fully initialized, hence is null. When you set the datareader as the datasource and attempt to >>> bind to it, it's a null value, not an empty datareader, but a null value instead since the datareader wasn't initialized fully. >>> >>> -- >>> Hope this helps, >>> Mark Fitzpatrick >>> Former Microsoft FrontPage MVP 199?-2006 >>> >>> >>> "Jon Paal" <Jon[ nospam ]Paal @ everywhere dot com> wrote in message news:Oir5TZf9GHA.4712(a)TK2MSFTNGP03.phx.gbl... >>>> anybody know what causes this error message reported by visual studio just in tiime debugger ? >>>> >>>> I get it when trying to populate a simple gridview from a datareader. Running locally, the code compiles, but after the page >>>> renders, I get the debugger popping up and it gives me the following error message >>>> >>>> >>>> "an unhandled exception('System.NullReferenceException') occurred in aspnet_wp_exe " >>>> >>>> >>>> >>>> >>>> >>> >>> >> >> > >
|
Pages: 1 Prev: WebForm_AutoFocus Next: 'WebForm_SaveScrollPositionSubmit' is undefined |