473,228 Members | 1,902 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,228 software developers and data experts.

System.StackOverFlowException throw for no reason

I am writting a DB front end in VB.NET 2003 I have a form that displays
employee information it has a dataset loaded from the DB that also includes
tables for lookup in some comboboxes that are bound to the employees table so
I load the combo boxes and then set the selectedText propertyt to bind to the
Employee table as only those listed are choosable, This works problem is now
my app it throwing the exception above within the system.windows.forms.dll
namespace if I try to change the record I get the error (navigate through
them) if I try to load it from another form in the app I get the error I can
only load the form as the startup form, I can get any one of the three combo
boxes to aloow me to select but after I try to use any other control I get
the exception thrown, any ideas guys? the code is below for perusing if you
like. Oh by the way the debugger says there is no source code for the
exception and only lets me view the dissassembly and the exception is always
at the same line of dissassembly.

Dim odbAISConnection As New OleDb.OleDbConnection("Provider=Microsoft.Jet.
OLEDB.4.0.;" & "Data Source=" & Application.StartupPath & "\Data\Employees.
edb;User Id=Admin;Password=")

'Dim dsAdmin As New Data.DataSet

Dim dsEmployees As New Data.DataSet

Public Sub LoadDataSets()
Me.odbAISConnection.Open()

Dim odbaEmployees As New OleDb.OleDbDataAdapter
Dim odbaCerts As New OleDb.OleDbDataAdapter
Dim odbaAddresses As New OleDb.OleDbDataAdapter
Dim odbaPhone As New OleDb.OleDbDataAdapter
Dim odbaEC As New OleDb.OleDbDataAdapter
Dim odbaMedctrl As New OleDb.OleDbDataAdapter

Dim odbsEmployees As New OleDb.OleDbCommand("Select Employees.* FROM
Employees ORDER BY txtLastName, txtFirstName, txtMiddleInitial")
Dim odbsCerts As New OleDb.OleDbCommand("Select Certs.* FROM Certs")
Dim odbsAddresses As New OleDb.OleDbCommand("Select Addresses.* FROM
Addresses")
Dim odbsPhone As New OleDb.OleDbCommand("Select PhoneNumbers.* FROM
PhoneNumbers")
Dim odbsEC As New OleDb.OleDbCommand("Select EmergencyContacts.* FROM
EmergencyContacts")
Dim odbsMedctrl As New OleDb.OleDbCommand("Select Medctrl.* FROM
Medctrl")

Dim odbcEmployees As New OleDb.OleDbCommandBuilder(odbaEmployees)
Dim odbcCerts As New OleDb.OleDbCommandBuilder(odbaCerts)
Dim odbcAddresses As New OleDb.OleDbCommandBuilder(odbaAddresses)
Dim odbcPhone As New OleDb.OleDbCommandBuilder(odbaPhone)
Dim odbcEC As New OleDb.OleDbCommandBuilder(odbaEC)
Dim odbcMedctrl As New OleDb.OleDbCommandBuilder(odbaMedctrl)

'Dim odbaTrucks As New OleDb.OleDbDataAdapter
Dim odbaCertList As New OleDb.OleDbDataAdapter
Dim odbaPhoneTypes As New OleDb.OleDbDataAdapter
Dim odbaStatusList As New OleDb.OleDbDataAdapter
'Dim odbaShiftType As New OleDb.OleDbDataAdapter
Dim odbaTrain As New OleDb.OleDbDataAdapter
'Dim odbaOffense As New OleDb.OleDbDataAdapter
'Dim odbaLevel As New OleDb.OleDbDataAdapter
'Dim odbaLocations As New OleDb.OleDbDataAdapter
'Dim odbaWeeks As New OleDb.OleDbDataAdapter
Dim odbaClass As New OleDb.OleDbDataAdapter
Dim odbaHospitals As New OleDb.OleDbDataAdapter
'Dim odbaDays As New OleDb.OleDbDataAdapter
'Dim odbaDisciplineActions As New OleDb.OleDbDataAdapter
Dim odbaZips As New OleDb.OleDbDataAdapter

'Dim odbsTrucks As New OleDb.OleDbCommand("Select Trucks.* FROM
Trucks")
Dim odbsCertList As New OleDb.OleDbCommand("Select CertificationList.
* FROM CertificationList")
Dim odbsPhoneTypes As New OleDb.OleDbCommand("Select PhoneTypeList.*
FROM PhoneTypeList")
Dim odbsStatusList As New OleDb.OleDbCommand("Select StatusList.*
FROM StatusList")
'Dim odbsShiftType As New OleDb.OleDbCommand("Select ShiftTypeList.*
FROM ShiftTypeList")
Dim odbsTrain As New OleDb.OleDbCommand("Select TrainingTypeList.*
FROM TrainingTypeList")
'Dim odbsOffense As New OleDb.OleDbCommand("Select OffenseList.* FROM
OffenseList")
'Dim odbsLevel As New OleDb.OleDbCommand("Select LevelList.* FROM
LevelList")
'Dim odbsLocations As New OleDb.OleDbCommand("Select LocationList.*
FROM LocationList")
'Dim odbsWeeks As New OleDb.OleDbCommand("Select WeeksList.* FROM
WeeksList")
Dim odbsClass As New OleDb.OleDbCommand("Select ClassList.* FROM
ClassList")
Dim odbsHospitals As New OleDb.OleDbCommand("Select HospitalList.*
FROM HospitalList")
'Dim odbsDays As New OleDb.OleDbCommand("Select DayofWeek.* FROM
DayofWeek")
'Dim odbsDisciplineActions As New OleDb.OleDbCommand("Select
ActionsList.* FROM ActionsList")
Dim odbsZips As New OleDb.OleDbCommand("Select ZipCodes.* FROM
ZipCodes ORDER BY State_Abbreviation")

'Dim odbcTrucks As New OleDb.OleDbCommandBuilder(odbaTrucks)
Dim odbcCertList As New OleDb.OleDbCommandBuilder(odbaCertList)
Dim odbcPhoneTypes As New OleDb.OleDbCommandBuilder(odbaPhoneTypes)
Dim odbcStatusList As New OleDb.OleDbCommandBuilder(odbaStatusList)
'Dim odbcShiftType As New OleDb.OleDbCommandBuilder(odbaShiftType)
Dim odbcTrain As New OleDb.OleDbCommandBuilder(odbaTrain)
'Dim odbcOffense As New OleDb.OleDbCommandBuilder(odbaOffense)
'Dim odbcLevel As New OleDb.OleDbCommandBuilder(odbaLevel)
'Dim odbcLocations As New OleDb.OleDbCommandBuilder(odbaLocations)
'Dim odbcWeeks As New OleDb.OleDbCommandBuilder(odbaWeeks)
'Dim odbcClass As New OleDb.OleDbCommandBuilder(odbaClass)
Dim odbcHospitals As New OleDb.OleDbCommandBuilder(odbaHospitals)
'Dim odbcDays As New OleDb.OleDbCommandBuilder(odbaDays)
'Dim odbcDisciplineActions As New OleDb.OleDbCommandBuilder
(odbaDisciplineActions)
Dim odbcZips As New OleDb.OleDbCommandBuilder(odbaZips)

odbaEmployees.MissingSchemaAction = MissingSchemaAction.AddWithKey
odbaEmployees.SelectCommand = odbsEmployees
odbaEmployees.SelectCommand.Connection = odbAISConnection

odbaCerts.MissingSchemaAction = MissingSchemaAction.AddWithKey
odbaCerts.SelectCommand = odbsCerts
odbaCerts.SelectCommand.Connection = odbAISConnection

odbaAddresses.MissingSchemaAction = MissingSchemaAction.AddWithKey
odbaAddresses.SelectCommand = odbsAddresses
odbaAddresses.SelectCommand.Connection = odbAISConnection

odbaPhone.MissingSchemaAction = MissingSchemaAction.AddWithKey
odbaPhone.SelectCommand = odbsPhone
odbaPhone.SelectCommand.Connection = odbAISConnection

odbaEC.MissingSchemaAction = MissingSchemaAction.AddWithKey
odbaEC.SelectCommand = odbsEC
odbaEC.SelectCommand.Connection = odbAISConnection

odbaMedctrl.MissingSchemaAction = MissingSchemaAction.AddWithKey
odbaMedctrl.SelectCommand = odbsEC
odbaMedctrl.SelectCommand.Connection = odbAISConnection

'odbaTrucks.MissingSchemaAction = MissingSchemaAction.AddWithKey
'odbaTrucks.SelectCommand = odbsTrucks
'odbaTrucks.SelectCommand.Connection = odbAISConnection

odbaCertList.MissingSchemaAction = MissingSchemaAction.AddWithKey
odbaCertList.SelectCommand = odbsCertList
odbaCertList.SelectCommand.Connection = odbAISConnection

odbaPhoneTypes.MissingSchemaAction = MissingSchemaAction.AddWithKey
odbaPhoneTypes.SelectCommand = odbsPhoneTypes
odbaPhoneTypes.SelectCommand.Connection = odbAISConnection

odbaStatusList.MissingSchemaAction = MissingSchemaAction.AddWithKey
odbaStatusList.SelectCommand = odbsStatusList
odbaStatusList.SelectCommand.Connection = odbAISConnection

'odbaShiftType.MissingSchemaAction = MissingSchemaAction.AddWithKey
'odbaShiftType.SelectCommand = odbsShiftType
'odbaShiftType.SelectCommand.Connection = odbAISConnection

odbaTrain.MissingSchemaAction = MissingSchemaAction.AddWithKey
odbaTrain.SelectCommand = odbsTrain
odbaTrain.SelectCommand.Connection = odbAISConnection

'odbaOffense.MissingSchemaAction = MissingSchemaAction.AddWithKey
'odbaOffense.SelectCommand = odbsOffense
'odbaOffense.SelectCommand.Connection = odbAISConnection

'odbaLevel.MissingSchemaAction = MissingSchemaAction.AddWithKey
'odbaLevel.SelectCommand = odbsLevel
'odbaLevel.SelectCommand.Connection = odbAISConnection

'odbaLocations.MissingSchemaAction = MissingSchemaAction.AddWithKey
'odbaLocations.SelectCommand = odbsLocations
'odbaLocations.SelectCommand.Connection = odbAISConnection

'odbaWeeks.MissingSchemaAction = MissingSchemaAction.AddWithKey
'odbaWeeks.SelectCommand = odbsWeeks
'odbaWeeks.SelectCommand.Connection = odbAISConnection

odbaClass.MissingSchemaAction = MissingSchemaAction.AddWithKey
odbaClass.SelectCommand = odbsClass
odbaClass.SelectCommand.Connection = odbAISConnection

odbaHospitals.MissingSchemaAction = MissingSchemaAction.AddWithKey
odbaHospitals.SelectCommand = odbsHospitals
odbaHospitals.SelectCommand.Connection = odbAISConnection

'odbaDays.MissingSchemaAction = MissingSchemaAction.AddWithKey
'odbaDays.SelectCommand = odbsDays
'odbaDays.SelectCommand.Connection = odbAISConnection

'odbaDisciplineActions.MissingSchemaAction = MissingSchemaAction.
AddWithKey
'odbaDisciplineActions.SelectCommand = odbsDisciplineActions
'odbaDisciplineActions.SelectCommand.Connection = odbAISConnection

odbaZips.MissingSchemaAction = MissingSchemaAction.AddWithKey
odbaZips.SelectCommand = odbsZips
odbaZips.SelectCommand.Connection = odbAISConnection

Try
dsEmployees.ReadXmlSchema(Application.StartupPath & "\Data\
EmployeeData.xsd")
Catch ex As Exception
MessageBox.Show("File Missing Try again", "Missing",
MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1,
MessageBoxOptions.DefaultDesktopOnly)
End Try
Try
odbaEmployees.Fill(dsEmployees, "Employees")
odbaCerts.Fill(dsEmployees, "Certs")
odbaAddresses.Fill(dsEmployees, "Addresses")
odbaPhone.Fill(dsEmployees, "PhoneNumbers")
odbaEC.Fill(dsEmployees, "EmergencyContacts")
odbaMedctrl.Fill(dsEmployees, "Medctrl")
'odbaTrucks.Fill(dsAdmin, "Trucks")
odbaCertList.Fill(dsEmployees, "CertificationList")
odbaPhoneTypes.Fill(dsEmployees, "PhoneTypeList")
odbaStatusList.Fill(dsEmployees, "StatusList")
'odbaShiftType.Fill(dsAdmin, "ShiftTypeList")
odbaTrain.Fill(dsEmployees, "TrainingTypeList")
'odbaOffense.Fill(dsAdmin, "OffenseList")
'odbaLevel.Fill(dsAdmin, "LevelList")
'odbaLocations.Fill(dsAdmin, "LocationList")
'odbaWeeks.Fill(dsAdmin, "WeeksList")
odbaClass.Fill(dsEmployees, "ClassList")
odbaHospitals.Fill(dsEmployees, "HospitalList")
'odbaDays.Fill(dsAdmin, "DayofWeek")
'odbaDisciplineActions.Fill(dsAdmin, "ActionsList")
odbaZips.Fill(dsEmployees, "ZipCodes")
Catch ex As Exception
MessageBox.Show(ex.ToString, "Sorry", MessageBoxButtons.OK,
MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, MessageBoxOptions.
DefaultDesktopOnly)
End Try

Me.odbAISConnection.Close()
Me.odbAISConnection.Open()

''odbaTrucks.MissingSchemaAction = MissingSchemaAction.AddWithKey
''odbaTrucks.SelectCommand = odbsTrucks
''odbaTrucks.SelectCommand.Connection = odbAISConnection

'odbaCertList.MissingSchemaAction = MissingSchemaAction.AddWithKey
'odbaCertList.SelectCommand = odbsCertList
'odbaCertList.SelectCommand.Connection = odbAISConnection

'odbaPhoneTypes.MissingSchemaAction = MissingSchemaAction.AddWithKey
'odbaPhoneTypes.SelectCommand = odbsPhoneTypes
'odbaPhoneTypes.SelectCommand.Connection = odbAISConnection

'odbaStatusList.MissingSchemaAction = MissingSchemaAction.AddWithKey
'odbaStatusList.SelectCommand = odbsStatusList
'odbaStatusList.SelectCommand.Connection = odbAISConnection

''odbaShiftType.MissingSchemaAction = MissingSchemaAction.AddWithKey
''odbaShiftType.SelectCommand = odbsShiftType
''odbaShiftType.SelectCommand.Connection = odbAISConnection

'odbaTrain.MissingSchemaAction = MissingSchemaAction.AddWithKey
'odbaTrain.SelectCommand = odbsTrain
'odbaTrain.SelectCommand.Connection = odbAISConnection

''odbaOffense.MissingSchemaAction = MissingSchemaAction.AddWithKey
''odbaOffense.SelectCommand = odbsOffense
''odbaOffense.SelectCommand.Connection = odbAISConnection

''odbaLevel.MissingSchemaAction = MissingSchemaAction.AddWithKey
''odbaLevel.SelectCommand = odbsLevel
''odbaLevel.SelectCommand.Connection = odbAISConnection

''odbaLocations.MissingSchemaAction = MissingSchemaAction.AddWithKey
''odbaLocations.SelectCommand = odbsLocations
''odbaLocations.SelectCommand.Connection = odbAISConnection

''odbaWeeks.MissingSchemaAction = MissingSchemaAction.AddWithKey
''odbaWeeks.SelectCommand = odbsWeeks
''odbaWeeks.SelectCommand.Connection = odbAISConnection

'odbaClass.MissingSchemaAction = MissingSchemaAction.AddWithKey
'odbaClass.SelectCommand = odbsClass
'odbaClass.SelectCommand.Connection = odbAISConnection

'odbaHospitals.MissingSchemaAction = MissingSchemaAction.AddWithKey
'odbaHospitals.SelectCommand = odbsHospitals
'odbaHospitals.SelectCommand.Connection = odbAISConnection

''odbaDays.MissingSchemaAction = MissingSchemaAction.AddWithKey
''odbaDays.SelectCommand = odbsDays
''odbaDays.SelectCommand.Connection = odbAISConnection

''odbaDisciplineActions.MissingSchemaAction = MissingSchemaAction.
AddWithKey
''odbaDisciplineActions.SelectCommand = odbsDisciplineActions
''odbaDisciplineActions.SelectCommand.Connection = odbAISConnection

'odbaZips.MissingSchemaAction = MissingSchemaAction.AddWithKey
'odbaZips.SelectCommand = odbsZips
'odbaZips.SelectCommand.Connection = odbAISConnection

'Try
' dsAdmin.ReadXmlSchema(Application.StartupPath & "\Data\EmpLU.
xsd")
'Catch ex As Exception
' MessageBox.Show("File Missing Try again", "Missing",
MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1,
MessageBoxOptions.DefaultDesktopOnly)
'End Try
'Try
' 'odbaTrucks.Fill(dsAdmin, "Trucks")
' odbaCertList.Fill(dsAdmin, "CertificationList")
' odbaPhoneTypes.Fill(dsAdmin, "PhoneTypeList")
' odbaStatusList.Fill(dsAdmin, "StatusList")
' 'odbaShiftType.Fill(dsAdmin, "ShiftTypeList")
' odbaTrain.Fill(dsAdmin, "TrainingTypeList")
' 'odbaOffense.Fill(dsAdmin, "OffenseList")
' 'odbaLevel.Fill(dsAdmin, "LevelList")
' 'odbaLocations.Fill(dsAdmin, "LocationList")
' 'odbaWeeks.Fill(dsAdmin, "WeeksList")
' odbaClass.Fill(dsAdmin, "ClassList")
' odbaHospitals.Fill(dsAdmin, "HospitalList")
' 'odbaDays.Fill(dsAdmin, "DayofWeek")
' 'odbaDisciplineActions.Fill(dsAdmin, "ActionsList")
' odbaZips.Fill(dsAdmin, "ZipCodes")
'Catch ex As Exception
' MessageBox.Show(ex.ToString, "Sorry", MessageBoxButtons.OK,
MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, MessageBoxOptions.
DefaultDesktopOnly)
'End Try

'Me.odbAISConnection.Close()

End Sub

Public Sub LoadCombo()
Me.cmbSelectEmp.Items.Clear()
Dim i As Int32 = 0
Dim Name As String
For i = 0 To Me.dsEmployees.Tables("Employees").Rows.Count - 1
Name = Me.dsEmployees.Tables("Employees").Rows(i).Item(0) & " --
" & Me.dsEmployees.Tables("Employees").Rows(i).Item(1) & ", " & Me.
dsEmployees.Tables("Employees").Rows(i).Item(2) & " " & Me.dsEmployees.Tables
("Employees").Rows(i).Item(3)
Me.cmbSelectEmp.Items.Add(Name)
Next

For i = 0 To Me.dsEmployees.Tables("ZipCodes").Rows.Count - 1
If Name = Me.dsEmployees.Tables("ZipCodes").Rows(i).Item(2) Then
Else
Name = Me.dsEmployees.Tables("ZipCodes").Rows(i).Item(2)
Me.cmbtxtST.Items.Add(Name)
End If
Next

i = 0
For i = 0 To Me.dsEmployees.Tables("ClassList").Rows.Count - 1
Name = Me.dsEmployees.Tables("ClassList").Rows(i).Item(1)
Me.cmbstrClass.Items.Add(Name)
Next

i = 0
For i = 0 To Me.dsEmployees.Tables("StatusList").Rows.Count - 1
Name = Me.dsEmployees.Tables("StatusList").Rows(i).Item(0 )
Me.cmbstrStatus.Items.Add(Name)
Next

Me.cmbSelectEmp.SelectedIndex = 0
End Sub
Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.
EventArgs) Handles btnAdd.Click
Try
'Clear out the current edits
Me.BindingContext(dsEmployees, "Employees").EndCurrentEdit()
Me.BindingContext(dsEmployees, "Employees").AddNew()
Catch eEndEdit As System.Exception
System.Windows.Forms.MessageBox.Show(eEndEdit.Mess age)
End Try
End Sub

Private Sub btnNavFirst_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnNavFirst.Click
Me.BindingContext(dsEmployees, "Employees").Position = 0
End Sub
Private Sub btnLast_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnLast.Click
Me.BindingContext(dsEmployees, "Employees").Position = (Me.
dsEmployees.Tables("Employees").Rows.Count - 1)
End Sub
Private Sub btnNavPrev_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnNavPrev.Click
Me.BindingContext(dsEmployees, "Employees").Position = (Me.
BindingContext(dsEmployees, "Employees").Position - 1)
End Sub
Private Sub btnNavNext_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnNavNext.Click
Try
Me.BindingContext(dsEmployees, "Employees").Position = (Me.
BindingContext(dsEmployees, "Employees").Position + 1)
Catch ex As Exception
MessageBox.Show(ex.ToString)
End Try


End Sub
Private Sub frmEmployeeAdmin_Load(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles MyBase.Load
'Me.editdtAdjDOH.Text.Format
LoadDataSets()

LoadCombo()

Me.editEmpID.DataBindings.Add("Text", dsEmployees, "Employees.EmpID")
Me.edittxtLastName.DataBindings.Add("Text", dsEmployees, "Employees.
txtLastName")
Me.edittxtFirstName.DataBindings.Add("Text", dsEmployees, "Employees.
txtFirstName")
Me.edittxtMiddleInitial.DataBindings.Add("Text", dsEmployees,
"Employees.txtMiddleInitial")
Me.editdtDOB.DataBindings.Add("Text", dsEmployees, "Employees.dtDOB")
Me.edittxtSS.DataBindings.Add("Text", dsEmployees, "Employees.txtSS")
Me.editdtDOH.DataBindings.Add("Text", dsEmployees, "Employees.dtDOH")
Me.cmbstrClass.DataBindings.Add("SelectedText", dsEmployees,
"Employees.strClassification")
'Me.editstrClassification.DataBindings.Add("Text", dsEmployees,
"Employees.strClassification")
Me.cmbstrStatus.DataBindings.Add("SelectedText", dsEmployees,
"Employees.strStatus")
'Me.editstrStatus.DataBindings.Add("Text", dsEmployees, "Employees.
strStatus")
Me.editdtAdjDOH.DataBindings.Add("Text", dsEmployees, "Employees.
dtAdjDOH")
Me.editdtPDE.DataBindings.Add("Text", dsEmployees, "Employees.dtPDE")
Me.edittxtDLN.DataBindings.Add("Text", dsEmployees, "Employees.
txtDLN")
Me.cmbtxtST.DataBindings.Add("SelectedText", dsEmployees, "Employees.
txtDLST")
'Me.edittxtDLST.DataBindings.Add("Text", dsEmployees, "Employees.
txtDLST")
Me.editdtDLExp.DataBindings.Add("Text", dsEmployees, "Employees.
dtDLExp")
Me.edittxtDLRes.DataBindings.Add("Text", dsEmployees, "Employees.
txtDLRes")
Me.edittxtDLEnd.DataBindings.Add("Text", dsEmployees, "Employees.
txtDLEnd")
Me.editbNU.DataBindings.Add("Checked", dsEmployees, "Employees.bNU")
Me.editbHBVDec.DataBindings.Add("Checked", dsEmployees, "Employees.
bHBVDec")
Me.editdtHBVDecD.DataBindings.Add("Text", dsEmployees, "Employees.
dtHBVDecD")
Me.editdtHBV.DataBindings.Add("Text", dsEmployees, "Employees.dtHBV")
Me.editdtHBV1.DataBindings.Add("Text", dsEmployees, "Employees.
dtHBV1")
Me.editdtHBV2.DataBindings.Add("Text", dsEmployees, "Employees.
dtHBV2")
Me.editdtHBVT.DataBindings.Add("Text", dsEmployees, "Employees.
dtHBVT")
Me.editdtPPD.DataBindings.Add("Text", dsEmployees, "Employees.dtPPD")
Me.editdtOSHA.DataBindings.Add("Text", dsEmployees, "Employees.
dtOSHA")
Me.editdtHaz.DataBindings.Add("Text", dsEmployees, "Employees.dtHaz")
Me.editComments.DataBindings.Add("Text", dsEmployees, "Employees.
Comments")

'Me.dgCerts.DataSource = dsEmployees
'Me.dgCerts.DataMember = "Employees.EmployeesCerts"

'Me.dgAddress.DataSource = dsEmployees.Tables("Addresses").
ParentRelations("EmployeesAddresses")
'Me.dgAddress.DataM = "Employees.EmployeesAddresses"

'Me.dgPhones.DataSource = dsEmployees.Tables("Employees")
'Me.dgPhones.DataMember = "EmployeesPhoneNumbers"

'Me.dgEC.DataSource = dsEmployees
'Me.dgEC.DataMember = "Employees.EmployeesEmergencyContacts"

'Me.dgMedctrl.DataSource = dsEmployees
'Me.dgMedctrl.DataMember = "Employees.EmployeesMedctrl"

May 18 '07 #1
5 3781
scheidel21 <u34293@uwewrote:
I am writting a DB front end in VB.NET 2003 I have a form that displays
employee information it has a dataset loaded from the DB that also includes
tables for lookup in some comboboxes that are bound to the employees table so
I load the combo boxes and then set the selectedText propertyt to bind to the
Employee table as only those listed are choosable, This works problem is now
my app it throwing the exception above within the system.windows.forms.dll
namespace if I try to change the record I get the error (navigate through
them) if I try to load it from another form in the app I get the error I can
only load the form as the startup form, I can get any one of the three combo
boxes to aloow me to select but after I try to use any other control I get
the exception thrown, any ideas guys? the code is below for perusing if you
like. Oh by the way the debugger says there is no source code for the
exception and only lets me view the dissassembly and the exception is always
at the same line of dissassembly.
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 Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
May 18 '07 #2
I actually am rewitting the entire application in a new project, suspecting
that there may be corrupted code somewhere in the original, this is somewhat
confirmed by the fact that when I created a new project and added the form
(Code and all) that was giving me problems, i then attempted to run it and it
caused a blue screen of death crash three times each time I compiled. I
simply had a lot of time devoted to development in the other project all
ready and didn't want to replicate work, but I may have to. If the new
version has the same problem I;ll be sure to send you a copy, as it will be
only this form as this is the one I started with in the new project.

Jon Skeet [C# MVP] wrote:
>I am writting a DB front end in VB.NET 2003 I have a form that displays
employee information it has a dataset loaded from the DB that also includes
[quoted text clipped - 10 lines]
>exception and only lets me view the dissassembly and the exception is always
at the same line of dissassembly.

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.
--
Message posted via DotNetMonster.com
http://www.dotnetmonster.com/Uwe/For...neral/200705/1

May 18 '07 #3
Well the rwrite didn't work I spent hours on the Form design naming
everything then reorganizing the code and goinf through it and I still get
the same error in the same place in the assembly from the same triggers. I
have it all setup in a zip file if you are willing to try it for me. Also so
you know I am programming in .net 1.1.

scheidel21 wrote:
>I actually am rewitting the entire application in a new project, suspecting
that there may be corrupted code somewhere in the original, this is somewhat
confirmed by the fact that when I created a new project and added the form
(Code and all) that was giving me problems, i then attempted to run it and it
caused a blue screen of death crash three times each time I compiled. I
simply had a lot of time devoted to development in the other project all
ready and didn't want to replicate work, but I may have to. If the new
version has the same problem I;ll be sure to send you a copy, as it will be
only this form as this is the one I started with in the new project.
>>I am writting a DB front end in VB.NET 2003 I have a form that displays
employee information it has a dataset loaded from the DB that also includes
[quoted text clipped - 7 lines]
>>See http://www.pobox.com/~skeet/csharp/complete.html for details of
what I mean by that.
--
Message posted via DotNetMonster.com
http://www.dotnetmonster.com/Uwe/For...neral/200705/1

May 18 '07 #4
scheidel21 via DotNetMonster.com <u34293@uwewrote:
Well the rwrite didn't work I spent hours on the Form design naming
everything then reorganizing the code and goinf through it and I still get
the same error in the same place in the assembly from the same triggers. I
have it all setup in a zip file if you are willing to try it for me. Also so
you know I am programming in .net 1.1.
Rather than have a full zip file, it would be better if you could take
a separate copy of the app, then gradually reduce it until you've got
the bare minimum that causes the problem. I suspect you'll find the
error by then anyway, but if not it would still make it easier for
everyone else to help.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
May 18 '07 #5
Actually I did find it it wasn;t in the code because the code was valid, it
was in the binding pproperty I was binding a data field in one table to a
selectedText value from a combobox which was populated by data from another
table, it was causing errors in the memory space, Changing the binding to the
text value cured the problem. Thankyou for you help.

Jon Skeet [C# MVP] wrote:
>Well the rwrite didn't work I spent hours on the Form design naming
everything then reorganizing the code and goinf through it and I still get
the same error in the same place in the assembly from the same triggers. I
have it all setup in a zip file if you are willing to try it for me. Also so
you know I am programming in .net 1.1.

Rather than have a full zip file, it would be better if you could take
a separate copy of the app, then gradually reduce it until you've got
the bare minimum that causes the problem. I suspect you'll find the
error by then anyway, but if not it would still make it easier for
everyone else to help.
--
Message posted via DotNetMonster.com
http://www.dotnetmonster.com/Uwe/For...neral/200705/1

May 19 '07 #6

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

Similar topics

0
by: Martyn Wynne | last post by:
Hi, Can anyone please tell me if there is any reason why when i am streaming from a webrequest (decompressing on route) to a file on the hard drive, i would be getting an exception of Filestream...
5
by: Jesee | last post by:
I am reading Jeffrey Richter's book "Applied Microsoft .NET Framework programming",i came across "Exception handing". Page 405 says "If the stack overflow occurs within the CLR itself,your...
2
by: Anders Both | last post by:
In a system with asynkronius socket and different collection, there are some times throw a System.StackOverflowException . I cannot really figur out why , Can someone say something clever about...
12
by: Amy | last post by:
I'm getting a System.StackOverflowException, and I can't see why. Here's the code that's throwing the exception. I don't see anyting that's recursive about it. Any help is appreciated (including...
3
by: Patrick.O.Ige | last post by:
Error:- System.StackOverflowException: Exception of type System.StackOverflowException was thrown. When is this thrown.. Any ideas
0
by: Nikhil Khade | last post by:
Hello, After around 3 months, I reopened a old VB.NET solutions which used to work (and build) without any errors. Just to test it again, I build it again and it completed, without any errors,...
10
by: Mae Lim | last post by:
Dear all, I'm new to C# WebServices. I compile the WebService project it return no errors "Build: 1 succeeded, 0 failed, 0 skipped". Basically I have 2 WebMethod, when I try to invoke the...
2
by: Modica82 | last post by:
Hi all, I am trying to generate a stub class for my web service using wsdl.exe but every time i run it from the visual studio command prompt i get a System.StackOverFlowException. Has anyone...
1
by: HyVong | last post by:
Hi Everyone, please help, i'm very frustrated because i can't run my application. I built my application using the .NET Installer, i ran the installer on the development machine and it sets the...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...

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.