473,405 Members | 2,272 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,405 software developers and data experts.

traversing down the constructors from base class - SystemIndexOutofRangeException - system.data.dll -there is no row at position 0 ?

My runtime in debug is dropping through the constructors from an upper level
class into subclassed constructors.....

namespace AB
public class A : MarshalByRefObject
public A () //ctor for A
{ System.Diagnostics.Debug.WriteLine(" A ctor - no
; } <-- first stop.
public class B : A
{ public B () } //ctor for B
<-- second stop.

namespace DA
public class DABase : B
{ public DABase() } //ctor for DABase
<-- third stop.

public class AV : DABase, IAV
{
public AV(Token token) //ctor for AV
{
//statement or no statement, result still the same
<-- last stop before exception
} // SystemIndexOutofRangeException - system.data.dll -there is no
row at position 0
Why system.data?
System.Data is referenced in these projects but why would system.data.dll be
involved in the exception during the downward constructor traversal?
Note: class AV is the class that was called by the client passing a
parameter whose constructor with that signature is never reached.
here is what starts the process - AV m_AV= new AV(tkn);

Thank you for any ideas....?

-Greg

Nov 16 '05 #1
6 1510
My runtime in debug is dropping through the constructors from an upper level
class into subclassed constructors.....

namespace AB
public class A : MarshalByRefObject
public { A () } //ctor <-- first stop.

public class B : A
{ public B () } //ctor <-- second stop.

namespace DA
public class DABase : B
{ public DABase() } //ctor <-- third stop.

public class AV : DABase, IAV
{
public AV(Token token) //ctor for AV
{ //statement or no statement, result still the same } <-- last stop
before exception
-> SystemIndexOutofRangeException - system.data.dll -there is no row at
position 0
Why system.data?
System.Data is referenced in these projects but why would system.data.dll be
involved in the exception during the downward constructor traversal?
Note: class AV is the class that was called by the client passing a
parameter whose constructor with that signature is never reached.
here is what starts the process - AV m_AV= new AV(tkn);

Thank you for any ideas. -Greg


Nov 16 '05 #2
hazz <ha**@sonic.net> wrote:
My runtime in debug is dropping through the constructors from an
upper level class into subclassed constructors.....
<snip>
} // SystemIndexOutofRangeException - system.data.dll -there is no
row at position 0
Why system.data?
System.Data is referenced in these projects but why would system.data.dll be
involved in the exception during the downward constructor traversal?


I suspect it's in the code that you snipped.

Could you post a short but complete program which demonstrates the
problem?

See http://www.pobox.com/~skeet/csharp/complete.html for details of
what I mean by that.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 16 '05 #3
Unhandled Exception: System.IndexOutOfRangeException: There is no row at
position 0.
at System.Data.DataRowCollection.get_Item(Int32 index)
at ServiceControl.MainForm.CheckDownload_Click(Object sender, EventArgs
e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventAr gs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons
button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage (Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(M essage& m)
at System.Windows.Forms.NativeWindow.DebuggableCallba ck(IntPtr hWnd,
Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchM essageW(MSG& msg)
at
System.Windows.Forms.ComponentManager.System.Windo ws.Forms.UnsafeNativeMetho
ds+IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason,
Int32 pvLoopData)
at System.Windows.Forms.ThreadContext.RunMessageLoopI nner(Int32 reason,
ApplicationContext context)
at System.Windows.Forms.ThreadContext.RunMessageLoop( Int32 reason,
ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at ServiceControl.MainForm.Main()The program '[3376] ServiceControl.exe'
has exited with code 0 (0x0).
Nov 16 '05 #4
Yes.

This has nothing to do with constructors.

According to the message, in the CheckDownload_Click event handler, someone
is trying to get a row out of a datatable.

This is exactly what one would expect, given the message you reported.

"hazz" <ha**@sonic.net> wrote in message
news:eQ*************@TK2MSFTNGP10.phx.gbl...
Unhandled Exception: System.IndexOutOfRangeException: There is no row at
position 0.
at System.Data.DataRowCollection.get_Item(Int32 index)
at ServiceControl.MainForm.CheckDownload_Click(Object sender, EventArgs
e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventAr gs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons
button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage (Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(M essage& m)
at System.Windows.Forms.NativeWindow.DebuggableCallba ck(IntPtr hWnd,
Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchM essageW(MSG& msg)
at
System.Windows.Forms.ComponentManager.System.Windo ws.Forms.UnsafeNativeMetho ds+IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.ThreadContext.RunMessageLoopI nner(Int32 reason,
ApplicationContext context)
at System.Windows.Forms.ThreadContext.RunMessageLoop( Int32 reason,
ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at ServiceControl.MainForm.Main()The program '[3376] ServiceControl.exe' has exited with code 0 (0x0).

Nov 16 '05 #5
Thank you Marina. It was an interesting excercise documenting the class
hierachy, whose constructors had just changed significantly....but I
wholeheartedly agree with you after looking at the log. I believe the
exception being thrown was at the callee's entry point when the object was
instantiated.
Appreciatively,
-greg

"Marina" <so*****@nospam.com> wrote in message
news:Ob**************@TK2MSFTNGP10.phx.gbl...
Yes.

This has nothing to do with constructors.

According to the message, in the CheckDownload_Click event handler, someone is trying to get a row out of a datatable.

This is exactly what one would expect, given the message you reported.

"hazz" <ha**@sonic.net> wrote in message
news:eQ*************@TK2MSFTNGP10.phx.gbl...
Unhandled Exception: System.IndexOutOfRangeException: There is no row at
position 0.
at System.Data.DataRowCollection.get_Item(Int32 index)
at ServiceControl.MainForm.CheckDownload_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventAr gs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons
button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage (Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(M essage& m)
at System.Windows.Forms.NativeWindow.DebuggableCallba ck(IntPtr hWnd,
Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchM essageW(MSG& msg) at

System.Windows.Forms.ComponentManager.System.Windo ws.Forms.UnsafeNativeMetho
ds+IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32

reason,
Int32 pvLoopData)
at System.Windows.Forms.ThreadContext.RunMessageLoopI nner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.ThreadContext.RunMessageLoop( Int32 reason,
ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at ServiceControl.MainForm.Main()The program '[3376]

ServiceControl.exe'
has exited with code 0 (0x0).


Nov 16 '05 #6
Thanks Jon,
Just talking through it and receiving Marina's answer was enough to have me
seek help internally within my company to get at the root. That is the end
of this thread. -greg

"Jon Skeet [C# MVP]" <sk***@pobox.com> wrote in message
news:MP************************@msnews.microsoft.c om...
hazz <ha**@sonic.net> wrote:
My runtime in debug is dropping through the constructors from an
upper level class into subclassed constructors.....


<snip>
} // SystemIndexOutofRangeException - system.data.dll -there is no row at position 0
Why system.data?
System.Data is referenced in these projects but why would system.data.dll be involved in the exception during the downward constructor traversal?


I suspect it's in the code that you snipped.

Could you post a short but complete program which demonstrates the
problem?

See http://www.pobox.com/~skeet/csharp/complete.html for details of
what I mean by that.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too

Nov 16 '05 #7

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

Similar topics

7
by: Beach Potato | last post by:
I guess I've been out of C++ for a while, since right now I don't seem to get a simple solution for overriding inherited constrictors. What worked in Borland C++ & Pascal (and Java, if I remember...
42
by: Edward Diener | last post by:
Coming from the C++ world I can not understand the reason why copy constructors are not used in the .NET framework. A copy constructor creates an object from a copy of another object of the same...
3
by: SLE | last post by:
Hi there, I know constructors are not inherited from the base class, not in VB.NET nor C# (nor Java I suppose). I never wondered,but reflecting on the reason why, I cannot find a solid answer. ...
1
by: Tony Johansson | last post by:
Hello!! Assume you have two classes one class called Base which is an abstract class and one derived class called Derived. You are not allowed to create an object of class Base like new...
4
by: Fernando Rodríguez | last post by:
Hi, If I try to compile the code below, I get a weird error that seems to be related with hte constructors. ------------------------------------- class Action : System.Object { Object...
2
by: PIEBALD | last post by:
OK, here's my latest workaround for the lack of inherited constructors... It requires that the class have a parameterless (default) constructor and a public virtual "Initialize" method (which...
3
by: craigkenisston | last post by:
Hi, I have a class with 3 constructors, one takes no arguments, other take an string and other an xml document. I want to derive another class of it, I don't need a different constructor so I...
4
by: lars.uffmann | last post by:
Hey everyone! I am (still) working on a project that I took over from former students, so don't blame me for the criminal approach on coding *g* The problem I have is fairly easy and while I...
12
by: Hemanth | last post by:
Hi, I have a base class with a static constructor and some abstract methods. Derived classes implement these methods. From articles on the web, it appears that there is no guarentee that this...
21
by: A n g l e r | last post by:
Hi all. I'm facing the following construction: class ClOld { public ClOld(string a) { ... } } class ClNew: ClOld
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...
0
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...

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.