VB error in edit statement

Can you paste the actual error you're receiving? We're missing something
here.

If you want, send me a copy of your customization (off-list so it doesn't
get stripped) and I'll load it on my side and see what's up.



*John Driggers*
**
*Chief Data Wrangler*
*
*
*I have an Epicor blog <http://usdoingstuff.com/>. How useful is that?*
*
*:: 904.404.9233
:: waffqle@...
:: http://www.usdoingstuff.com <http://www.usdoingstuff.com/>

*

*



On Wed, Oct 10, 2012 at 8:08 PM, bw2868bond <bwalker@...>wrote:

> **
>
>
> I wonder if you are having problems because you are changing a field
> inside of a field change event handler......
>
>
> --- In vantage@yahoogroups.com, Neil Buckman <nbuckman@...> wrote:
> >
> > Thanks Brian,
> >
> > I tried that and although it compiled correctly and all it still came
> back with a different error this time:
> >
> > Error Detail
> > ============
> > Property 'Chars' is ReadOnly.
> >
> >
> > Stack Trace
> > ===========
> > at
> Microsoft.VisualBasic.CompilerServices.NewLateBinding.ResolveCall(Container
> BaseReference, String MethodName, MemberInfo[] Members, Object[] Arguments,
> String[] ArgumentNames, Type[] TypeArguments, BindingFlags LookupFlags,
> Boolean ReportErrors, ResolutionFailure& Failure)
> > at
> Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateIndexSetComplex(Object
> Instance, Object[] Arguments, String[] ArgumentNames, Boolean
> OptimisticSet, Boolean RValueBase)
> > at Script.UD06_AfterFieldChange(Object sender, DataColumnChangeEventArgs
> args)
> > at System.Data.DataColumnChangeEventHandler.Invoke(Object sender,
> DataColumnChangeEventArgs e)
> > at System.Data.DataTable.OnColumnChanged(DataColumnChangeEventArgs e)
> > at
> Epicor.Mfg.BO.UD06DataSet.UD06DataTable.OnColumnChanged(DataColumnChangeEventArgs
> e)
> > at System.Data.DataRow.set_Item(DataColumn column, Object value)
> > at System.Data.DataRowView.SetColumnValue(DataColumn column, Object
> value)
> > at System.Data.DataRowView.set_Item(String property, Object value)
> > at Epicor.Mfg.UI.FrameWork.EpiNumericEditor.TextValidate(Object sender,
> CancelEventArgs ea)
> >
> > ------------------------------------
> > Private Sub UD06_AfterFieldChange(ByVal sender As Object, ByVal args As
> DataColumnChangeEventArgs)
> > ' ** Argument Properties and Uses **
> > ' args.Row("FieldName")
> > ' args.Column, args.ProposedValue, args.Row
> >
> > Dim edvUD06 As EpiDataView =
> CType(Me.oTrans.EpiDataViews("UD06"),EpiDataView)
> > Dim edvUD06Row As System.Data.DataRow = edvUD06.CurrentDataRow
> >
> > Dim CodeType As String = edvUD06Row("Key1")
> >
> > Dim START as Integer = args.ProposedValue
> >
> > Select Case args.Column.ColumnName
> >
> > Case "Number01"
> > If CodeType <> "PARTS" then Exit Select
> >
> > Dim pa As PartAdapter = New PartAdapter(UD06Form)
> > pa.BOConnect()
> >
> > ...Code here...
> >
> > pa.Dispose()
> >
> > edvUD06Row.BeginEdit
> > edvUD06Row(0)("Character01") = TheAnswer
> > edvUD06Row.EndEdit
> >
> > End Select
> > -----------------------------------
> >
> > - Neil
> >
> >
> >
> > From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On
> Behalf Of Brian Roberts
> > Sent: Thursday, 11 October 2012 12:17 AM
> > To: vantage@yahoogroups.com
> > Subject: RE: [Vantage] VB error in edit statement
> >
> >
> >
> > You're missing the row number parameter, the (0) below:
> >
> > edvUD06Row(0)("Character01") = "MYTEXT"
> >
> > Brian.
> >
> > From: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com> [mailto:
> vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>] On Behalf
> > Of nbuckman@...<mailto:nbuckman%40ymail.com>
>
> > Sent: Wednesday, October 10, 2012 7:39 AM
> > To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>
> > Subject: [Vantage] VB error in edit statement
> >
> > Am I blind? The code below throws an error at the edit statement saying
> > that conversion of "MYTEXT" to Integer is not valid.
> >
> > Why is it doing that? Any suggestions welcome...
> >
> > ----------------------------------------------------------
> > Private Sub UD06_AfterFieldChange(ByVal sender As Object, ByVal args As
> > DataColumnChangeEventArgs)
> >
> > Dim edvUD06 As EpiDataView = CType(Me.oTrans.EpiDataViews("UD06"),
> > EpiDataView)
> > Dim edvUD06Row As System.Data.DataRow = edvUD06.CurrentDataRow
> >
> > Select Case args.Column.ColumnName
> >
> > Case "Number01"
> >
> > ...CODE HERE...
> >
> > edvUD06Row.BeginEdit
> > edvUD06Row("Character01") = "MYTEXT" <== crashes here
> > edvUD06Row.EndEdit
> >
> > End Select
> > End Sub
> > ------------------------------------------
> >
> > - Neil
> >
> > [Non-text portions of this message have been removed]
> >
> >
> >
> > Notice:This e-mail and any attachments are confidential and are only for
> the use of the person to whom they are addressed. If you are not the
> intended recipient please advise the sender by return e-mail and delete the
> message and any attachments. Any use, interference with, disclosure or
> copying of this message or any attachments is unauthorised and prohibited.
> The sender does not warrant that the information is free of a virus or any
> other defect or error, and any views expressed herein, unless specifically
> indicated otherwise, are those of the individual sender.
> >
> > The DH Gibson Group of Companies - http://www.gibsonshopfitters.com.au
> >
> > P Please consider our shared environment before printing this
> communication.
> >
> >
> >
> > [Non-text portions of this message have been removed]
> >
>
>
>


[Non-text portions of this message have been removed]
Am I blind? The code below throws an error at the edit statement saying that conversion of "MYTEXT" to Integer is not valid.

Why is it doing that? Any suggestions welcome...

------------------------------------------------------------
Private Sub UD06_AfterFieldChange(ByVal sender As Object, ByVal args As DataColumnChangeEventArgs)

Dim edvUD06 As EpiDataView = CType(Me.oTrans.EpiDataViews("UD06"), EpiDataView)
Dim edvUD06Row As System.Data.DataRow = edvUD06.CurrentDataRow


Select Case args.Column.ColumnName

Case "Number01"

...CODE HERE...

edvUD06Row.BeginEdit
edvUD06Row("Character01") = "MYTEXT" <== crashes here
edvUD06Row.EndEdit

End Select
End Sub
------------------------------------------

- Neil
You're missing the row number parameter, the (0) below:

edvUD06Row(0)("Character01") = "MYTEXT"



Brian.



From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
Of nbuckman@...
Sent: Wednesday, October 10, 2012 7:39 AM
To: vantage@yahoogroups.com
Subject: [Vantage] VB error in edit statement






Am I blind? The code below throws an error at the edit statement saying
that conversion of "MYTEXT" to Integer is not valid.

Why is it doing that? Any suggestions welcome...

----------------------------------------------------------
Private Sub UD06_AfterFieldChange(ByVal sender As Object, ByVal args As
DataColumnChangeEventArgs)

Dim edvUD06 As EpiDataView = CType(Me.oTrans.EpiDataViews("UD06"),
EpiDataView)
Dim edvUD06Row As System.Data.DataRow = edvUD06.CurrentDataRow

Select Case args.Column.ColumnName

Case "Number01"

...CODE HERE...

edvUD06Row.BeginEdit
edvUD06Row("Character01") = "MYTEXT" <== crashes here
edvUD06Row.EndEdit

End Select
End Sub
------------------------------------------

- Neil





[Non-text portions of this message have been removed]
Thanks Brian,

I tried that and although it compiled correctly and all it still came back with a different error this time:

Error Detail
============
Property 'Chars' is ReadOnly.


Stack Trace
===========
at Microsoft.VisualBasic.CompilerServices.NewLateBinding.ResolveCall(Container BaseReference, String MethodName, MemberInfo[] Members, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments, BindingFlags LookupFlags, Boolean ReportErrors, ResolutionFailure& Failure)
at Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateIndexSetComplex(Object Instance, Object[] Arguments, String[] ArgumentNames, Boolean OptimisticSet, Boolean RValueBase)
at Script.UD06_AfterFieldChange(Object sender, DataColumnChangeEventArgs args)
at System.Data.DataColumnChangeEventHandler.Invoke(Object sender, DataColumnChangeEventArgs e)
at System.Data.DataTable.OnColumnChanged(DataColumnChangeEventArgs e)
at Epicor.Mfg.BO.UD06DataSet.UD06DataTable.OnColumnChanged(DataColumnChangeEventArgs e)
at System.Data.DataRow.set_Item(DataColumn column, Object value)
at System.Data.DataRowView.SetColumnValue(DataColumn column, Object value)
at System.Data.DataRowView.set_Item(String property, Object value)
at Epicor.Mfg.UI.FrameWork.EpiNumericEditor.TextValidate(Object sender, CancelEventArgs ea)

------------------------------------
Private Sub UD06_AfterFieldChange(ByVal sender As Object, ByVal args As DataColumnChangeEventArgs)
' ** Argument Properties and Uses **
' args.Row("FieldName")
' args.Column, args.ProposedValue, args.Row

Dim edvUD06 As EpiDataView = CType(Me.oTrans.EpiDataViews("UD06"),EpiDataView)
Dim edvUD06Row As System.Data.DataRow = edvUD06.CurrentDataRow

Dim CodeType As String = edvUD06Row("Key1")

Dim START as Integer = args.ProposedValue

Select Case args.Column.ColumnName

Case "Number01"
If CodeType <> "PARTS" then Exit Select

Dim pa As PartAdapter = New PartAdapter(UD06Form)
pa.BOConnect()

...Code here...

pa.Dispose()

edvUD06Row.BeginEdit
edvUD06Row(0)("Character01") = TheAnswer
edvUD06Row.EndEdit

End Select
-----------------------------------

- Neil



From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of Brian Roberts
Sent: Thursday, 11 October 2012 12:17 AM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] VB error in edit statement



You're missing the row number parameter, the (0) below:

edvUD06Row(0)("Character01") = "MYTEXT"

Brian.

From: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com> [mailto:vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>] On Behalf
Of nbuckman@...<mailto:nbuckman%40ymail.com>
Sent: Wednesday, October 10, 2012 7:39 AM
To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>
Subject: [Vantage] VB error in edit statement

Am I blind? The code below throws an error at the edit statement saying
that conversion of "MYTEXT" to Integer is not valid.

Why is it doing that? Any suggestions welcome...

----------------------------------------------------------
Private Sub UD06_AfterFieldChange(ByVal sender As Object, ByVal args As
DataColumnChangeEventArgs)

Dim edvUD06 As EpiDataView = CType(Me.oTrans.EpiDataViews("UD06"),
EpiDataView)
Dim edvUD06Row As System.Data.DataRow = edvUD06.CurrentDataRow

Select Case args.Column.ColumnName

Case "Number01"

...CODE HERE...

edvUD06Row.BeginEdit
edvUD06Row("Character01") = "MYTEXT" <== crashes here
edvUD06Row.EndEdit

End Select
End Sub
------------------------------------------

- Neil

[Non-text portions of this message have been removed]



Notice:This e-mail and any attachments are confidential and are only for the use of the person to whom they are addressed. If you are not the intended recipient please advise the sender by return e-mail and delete the message and any attachments. Any use, interference with, disclosure or copying of this message or any attachments is unauthorised and prohibited. The sender does not warrant that the information is free of a virus or any other defect or error, and any views expressed herein, unless specifically indicated otherwise, are those of the individual sender.

The DH Gibson Group of Companies - http://www.gibsonshopfitters.com.au

P Please consider our shared environment before printing this communication.



[Non-text portions of this message have been removed]
I wonder if you are having problems because you are changing a field inside of a field change event handler......

--- In vantage@yahoogroups.com, Neil Buckman <nbuckman@...> wrote:
>
> Thanks Brian,
>
> I tried that and although it compiled correctly and all it still came back with a different error this time:
>
> Error Detail
> ============
> Property 'Chars' is ReadOnly.
>
>
> Stack Trace
> ===========
> at Microsoft.VisualBasic.CompilerServices.NewLateBinding.ResolveCall(Container BaseReference, String MethodName, MemberInfo[] Members, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments, BindingFlags LookupFlags, Boolean ReportErrors, ResolutionFailure& Failure)
> at Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateIndexSetComplex(Object Instance, Object[] Arguments, String[] ArgumentNames, Boolean OptimisticSet, Boolean RValueBase)
> at Script.UD06_AfterFieldChange(Object sender, DataColumnChangeEventArgs args)
> at System.Data.DataColumnChangeEventHandler.Invoke(Object sender, DataColumnChangeEventArgs e)
> at System.Data.DataTable.OnColumnChanged(DataColumnChangeEventArgs e)
> at Epicor.Mfg.BO.UD06DataSet.UD06DataTable.OnColumnChanged(DataColumnChangeEventArgs e)
> at System.Data.DataRow.set_Item(DataColumn column, Object value)
> at System.Data.DataRowView.SetColumnValue(DataColumn column, Object value)
> at System.Data.DataRowView.set_Item(String property, Object value)
> at Epicor.Mfg.UI.FrameWork.EpiNumericEditor.TextValidate(Object sender, CancelEventArgs ea)
>
> ------------------------------------
> Private Sub UD06_AfterFieldChange(ByVal sender As Object, ByVal args As DataColumnChangeEventArgs)
> ' ** Argument Properties and Uses **
> ' args.Row("FieldName")
> ' args.Column, args.ProposedValue, args.Row
>
> Dim edvUD06 As EpiDataView = CType(Me.oTrans.EpiDataViews("UD06"),EpiDataView)
> Dim edvUD06Row As System.Data.DataRow = edvUD06.CurrentDataRow
>
> Dim CodeType As String = edvUD06Row("Key1")
>
> Dim START as Integer = args.ProposedValue
>
> Select Case args.Column.ColumnName
>
> Case "Number01"
> If CodeType <> "PARTS" then Exit Select
>
> Dim pa As PartAdapter = New PartAdapter(UD06Form)
> pa.BOConnect()
>
> ...Code here...
>
> pa.Dispose()
>
> edvUD06Row.BeginEdit
> edvUD06Row(0)("Character01") = TheAnswer
> edvUD06Row.EndEdit
>
> End Select
> -----------------------------------
>
> - Neil
>
>
>
> From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of Brian Roberts
> Sent: Thursday, 11 October 2012 12:17 AM
> To: vantage@yahoogroups.com
> Subject: RE: [Vantage] VB error in edit statement
>
>
>
> You're missing the row number parameter, the (0) below:
>
> edvUD06Row(0)("Character01") = "MYTEXT"
>
> Brian.
>
> From: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com> [mailto:vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>] On Behalf
> Of nbuckman@...<mailto:nbuckman%40ymail.com>
> Sent: Wednesday, October 10, 2012 7:39 AM
> To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>
> Subject: [Vantage] VB error in edit statement
>
> Am I blind? The code below throws an error at the edit statement saying
> that conversion of "MYTEXT" to Integer is not valid.
>
> Why is it doing that? Any suggestions welcome...
>
> ----------------------------------------------------------
> Private Sub UD06_AfterFieldChange(ByVal sender As Object, ByVal args As
> DataColumnChangeEventArgs)
>
> Dim edvUD06 As EpiDataView = CType(Me.oTrans.EpiDataViews("UD06"),
> EpiDataView)
> Dim edvUD06Row As System.Data.DataRow = edvUD06.CurrentDataRow
>
> Select Case args.Column.ColumnName
>
> Case "Number01"
>
> ...CODE HERE...
>
> edvUD06Row.BeginEdit
> edvUD06Row("Character01") = "MYTEXT" <== crashes here
> edvUD06Row.EndEdit
>
> End Select
> End Sub
> ------------------------------------------
>
> - Neil
>
> [Non-text portions of this message have been removed]
>
>
>
> Notice:This e-mail and any attachments are confidential and are only for the use of the person to whom they are addressed. If you are not the intended recipient please advise the sender by return e-mail and delete the message and any attachments. Any use, interference with, disclosure or copying of this message or any attachments is unauthorised and prohibited. The sender does not warrant that the information is free of a virus or any other defect or error, and any views expressed herein, unless specifically indicated otherwise, are those of the individual sender.
>
> The DH Gibson Group of Companies - http://www.gibsonshopfitters.com.au
>
> P Please consider our shared environment before printing this communication.
>
>
>
> [Non-text portions of this message have been removed]
>