ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hey all I am developing a front end in Visual Basic .NET to be deployed on XP machines and I have a form which keeps throwing the above exception within the system.windows.forms.dll namespace when it is thrwon it tells me there is no source code at that location and asks if I want to view the dissassembly. After scouring the net I have no solution was wondering if any of you had an idea, I have been toying around with the code suspecting it might just be to much stuff loaded at once I am posting the code below if any of you see a problem let me know Thanks a lot!
Alex
Quote:
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)
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.Message)
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
Yea I actually posted to about 7 different boards and my problem was resolved. Of sourse I also know this is a linux forum, but hey even the forum for programming says anything goes, you never know someone may have developed something in VB and had this problem before.
Well I am unsure exactly why it caused the problem, but because I bound the comboboxes "SelectedText" it was throwing the application into some sort of resource consuming loop, Changing the bound property to the "Text" property resolved the problem. Pretty simple and stupid huh.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.