|
-
Apr 9th, 2013, 05:32 PM
#1
Machine dependent error
I have a .Net 2005 program that runs fine on two of the three machines in the clients office. I get and "indexoutofrange" error when "FormClosing" is executed, the index number changes depending where I am in the grid.
Code:
Private Sub SaveApplicationData()
Try
Me.Validate()
Me.ApplicationBindingSource.EndEdit()
Me.ApplicationTableAdapter.Update(Me.NautiqueDataDataSet.Application)
Catch ex As Exception
MessageBox.Show(ex.ToString)
End Try
End Sub
Private Sub frmApplication_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
SaveApplicationData()
End Sub
I think that's what causes the error, it doesn't error on my development machine so I'm can't be sure. It happens when I click the form close button and that code is the only code in the form closing event. The "Me.NautiqueDataDataSet.Application" datatable is bound to a DGV. There are no other controls on the form, except a binding navigator.
There are other input screens that work fine so I know that the machine has read/write privileges. This machine was just added to the network and I ran the SetUp program, it's a laptop, windows 7 Pro 32 bit.
There are other .Net 2005 programs on this machine that use a DGV and they work fine
The other two machines are Windows XP 32 bit, but the programs runs fine on development machine Window 7 64 bit, and my laptop, Windows 8 64 bit.
Not sure how to debug this.
-
Apr 9th, 2013, 06:34 PM
#2
Re: Machine dependent error
It would be interesting to see the stack trace for the exception to determine exactly what index is out of range.
-
Apr 9th, 2013, 08:22 PM
#3
Re: Machine dependent error
jmc,
Thanks for the reply.
I've been thinking, when this happens, the error keeps redisplaying after you press OK. You have to open the Task Manager and end the process. The "SaveApplicationData" function has a Try/Catch, seem like this should let the form close.
Next time I'm out at their office I think I'll try testing the problem by having it write to a log file so I'll know for sure which line is causing the error.
If I can't find the problem I'll bring back more information on the error.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|