我基本上收集一个对象,并将其传递给一个方法,该方法使用该对象属性填充文本框,并选择单选按钮,组合框项目和日期选择日期...
我每隔三次或第四次得到此错误并重新填充所有值:
AccessViolationException: 尝试读取或写入受保护的内存。这通常表明其他内存已损坏。
有什么想法吗?
Protected Sub PopulateForms(ByVal a As OMGService.OmgApp)
Me.txtAppTitle.Text = a.Title
Me.txtAppVersion.Text = a.Version
Me.txtLicenseCount.Text = a.LicenseCount.ToString()
Me.txtAppLocation.Text = a.AppLocation
Me.txtDocLocation.Text = a.DocLocation
Me.txtKey.Text = a.Key
Me.txtAppNotes.Text = a.AppNotes
Me.cBoxAppLicType.SelectedItem = Me.cBoxAppLicType.Items.Item(a.LicenseType)
Me.radio64.IsChecked = a.IsX64
Me.radio86.IsChecked = IIf(Me.radio64.IsChecked, False, True)
Me.appInfoCreatedMsg.Text = String.Format("App Info Created: {0}", a.RecordCreated.ToString())
Me.appInfoModifiedMsg.Text = String.Format("App Info Modified: {0}", a.LastModified.ToString())
Me.txtOldPo.Text = a.OldCastlePO
Me.txtAltTicket.Text = a.AltirisTicketNum
Me.txtVendorName.Text = a.VendorName
Me.txtRepName.Text = a.VendorRepName
Me.txtRepPhone.Text = a.VendorRepPhone
Me.txtVendorOrderNum.Text = a.VendorOrderNumber
Me.txtTermsCond.Text = a.TermsConditions
Me.DateOfPurchasePicker.SelectedDate = a.DateOfPurchase
Me.OrderInfoCreatedMsg.Text = String.Format("Order Info Created: {0}", a.OrderRecordCreated)
Me.OrderInfoModifiedMsg.Text = String.Format("Order Info Created: {0}", a.LastModified)
Me.txtHiddenAppID.Text = a.AppID.ToString()
Me.txtHiddenOrderId.Text = a.OrderID.ToString()
End Sub