Error on Save Blank Title 73116

Well that's at least some progress... Try inserting a otrans.update() inside your loop as the last statement. That should save the values you've set within your dataview (temp data) to the permanent db tables they relate to.
Â
It also MAY trigger another endless loop problem. If it does, move the .update() outside the loop.

.refesh simply repaints the screen (just like pressing the refresh button does on the tool bar of the app).

.notify (or .notifyall) is a method that forces a notify to any .wait(ing) object threads that you've completed your custom processing & the object thread can wake up and complete its processing. (Syntax is nearly identical for VB, C# & java).

Not really sure why you are invoking .notifyall() since I see nothing in your code snippet that inherently requires it. Did you insert it or was it wizard generated?

BEST resource for basic code by far is on MS Technet: http://msdn.microsoft.com/en-us/library/sh9ywfdk(vs.71).aspx

Lot's of public domian examples you can 'borrow'.

For really nasty stuff, join The Code Project. I read some of the complex modules the advanced members post and my eyes glaze over in confusion :)

Rob
Â


--- On Tue, 1/20/09, wamitch1012 <wmitchell@...> wrote:

From: wamitch1012 <wmitchell@...>
Subject: [Vantage] Re: Error on Save
To: vantage@yahoogroups.com
Date: Tuesday, January 20, 2009, 5:08 AM






OK that almost works - I set up a loop as you suggested with those
two statements outside the loop. I no longer get the object reference
not set error, but it resets the fields I just changed back to their
original values.
Taking out both statements completely seems to force it to save the
changes - I can reopen the record and see the updated values have
been retained which is what I want. However at this stage I just
don't know this system well enough to understand the implications of
doing this.
Can you explain what NotifyAll and Refresh do, or where I can get
documentation that will tell me ?

Thanks

WM

--- In vantage@yahoogroups .com, Robert Brown <robertb_versa@ ...>
wrote:
>
> I think one or both of your:
>
> oTrans.NotifyAll( true)
> oTrans.Refresh
>
> statements is triggering the loop (likely the .Refresh).
>
> Try imbedding all the code except those statements in a controlled
loop (If/Then/End If) that tests a preset counter and exits after one
pass through.
>
> You should then be able to refresh outside the loop to repaint the
form with the new values.
>
> Rob
>
> --- On Mon, 1/19/09, wamitch1012 <wmitchell@. ..> wrote:
>
> From: wamitch1012 <wmitchell@. ..>
> Subject: [Vantage] Error on Save
> To: vantage@yahoogroups .com
> Date: Monday, January 19, 2009, 11:45 AM
>
>
>
>
>
>
> I have created a customised sheet within the JobOpDtl form.
> That sheet contains three fields which I would like to populate
with
> data and save back to the database.
> The section of my code (called from a button click event) which I'm
> attempting to use to do this is as follows:
>
> Dim edv As EpiDataView = CType(oTrans. EpiDataViews
> ("JobOpDtl") ,EpiDataView)
> edv.dataView( edv.Row). BeginEdit( )
> edv.dataView( edv.Row)( "Character01" ) = txtInstr1.text
> edv.dataview( edv.Row)( "Number20" ) = integer.parse(
nedEpiCustom7. text)
> edv.dataview( edv.Row)( "Number19" ) = integer.parse(
nedEpiCustom8. text)
> edv.dataview( edv.row). EndEdit()
> oTrans.NotifyAll( true)
> oTrans.Refresh
> edv.dispose
>
> When I test the changes, it crashes, giving the following error:
>
> Object reference not set to an instance of an object.
>
> Stack Trace
> ===========
> at Epicor.Mfg.UI. FrameWork. EpiDataView. processRowRules( Int32
RowNo,
> Boolean justGettingProps)
> at Epicor.Mfg.UI. FrameWork. EpiDataView. Notify(EpiNotify Args
args)
> at Epicor.Mfg.UI. FrameWork. EpiNumericEditor .TextValidate( Object
> sender, CancelEventArgs ea)
>
> At this point it gets itself into a loop and I have to Ctrl-Alt-Del
> to get out of it.
>
> I'm obviously doing something fundamentally wrong here, can someone
> maybe help by pointing out where ?
>
> Many thanks
>
> WM
>
I have created a customised sheet within the JobOpDtl form.
That sheet contains three fields which I would like to populate with
data and save back to the database.
The section of my code (called from a button click event) which I'm
attempting to use to do this is as follows:

Dim edv As EpiDataView = CType(oTrans.EpiDataViews
("JobOpDtl"),EpiDataView)
edv.dataView(edv.Row).BeginEdit()
edv.dataView(edv.Row)("Character01") = txtInstr1.text
edv.dataview(edv.Row)("Number20") = integer.parse(nedEpiCustom7.text)
edv.dataview(edv.Row)("Number19") = integer.parse(nedEpiCustom8.text)
edv.dataview(edv.row).EndEdit()
oTrans.NotifyAll(true)
oTrans.Refresh
edv.dispose

When I test the changes, it crashes, giving the following error:

Object reference not set to an instance of an object.

Stack Trace
===========
at Epicor.Mfg.UI.FrameWork.EpiDataView.processRowRules(Int32 RowNo,
Boolean justGettingProps)
at Epicor.Mfg.UI.FrameWork.EpiDataView.Notify(EpiNotifyArgs args)
at Epicor.Mfg.UI.FrameWork.EpiNumericEditor.TextValidate(Object
sender, CancelEventArgs ea)

At this point it gets itself into a loop and I have to Ctrl-Alt-Del
to get out of it.

I'm obviously doing something fundamentally wrong here, can someone
maybe help by pointing out where ?

Many thanks

WM
I think one or both of your:

oTrans.NotifyAll( true)
oTrans.Refresh

statements is triggering the loop (likely the .Refresh).

Try imbedding all the code except those statements in a controlled loop (If/Then/End If) that tests a preset counter and exits after one pass through.

You should then be able to refresh outside the loop to repaint the form with the new values.

Rob

--- On Mon, 1/19/09, wamitch1012 <wmitchell@...> wrote:

From: wamitch1012 <wmitchell@...>
Subject: [Vantage] Error on Save
To: vantage@yahoogroups.com
Date: Monday, January 19, 2009, 11:45 AM






I have created a customised sheet within the JobOpDtl form.
That sheet contains three fields which I would like to populate with
data and save back to the database.
The section of my code (called from a button click event) which I'm
attempting to use to do this is as follows:

Dim edv As EpiDataView = CType(oTrans. EpiDataViews
("JobOpDtl") ,EpiDataView)
edv.dataView( edv.Row). BeginEdit( )
edv.dataView( edv.Row)( "Character01" ) = txtInstr1.text
edv.dataview( edv.Row)( "Number20" ) = integer.parse( nedEpiCustom7. text)
edv.dataview( edv.Row)( "Number19" ) = integer.parse( nedEpiCustom8. text)
edv.dataview( edv.row). EndEdit()
oTrans.NotifyAll( true)
oTrans.Refresh
edv.dispose

When I test the changes, it crashes, giving the following error:

Object reference not set to an instance of an object.

Stack Trace
===========
at Epicor.Mfg.UI. FrameWork. EpiDataView. processRowRules( Int32 RowNo,
Boolean justGettingProps)
at Epicor.Mfg.UI. FrameWork. EpiDataView. Notify(EpiNotify Args args)
at Epicor.Mfg.UI. FrameWork. EpiNumericEditor .TextValidate( Object
sender, CancelEventArgs ea)

At this point it gets itself into a loop and I have to Ctrl-Alt-Del
to get out of it.

I'm obviously doing something fundamentally wrong here, can someone
maybe help by pointing out where ?

Many thanks

WM
OK that almost works - I set up a loop as you suggested with those
two statements outside the loop. I no longer get the object reference
not set error, but it resets the fields I just changed back to their
original values.
Taking out both statements completely seems to force it to save the
changes - I can reopen the record and see the updated values have
been retained which is what I want. However at this stage I just
don't know this system well enough to understand the implications of
doing this.
Can you explain what NotifyAll and Refresh do, or where I can get
documentation that will tell me ?

Thanks

WM


--- In vantage@yahoogroups.com, Robert Brown <robertb_versa@...>
wrote:
>
> I think one or both of your:
>
> oTrans.NotifyAll( true)
> oTrans.Refresh
>
> statements is triggering the loop (likely the .Refresh).
>
> Try imbedding all the code except those statements in a controlled
loop (If/Then/End If) that tests a preset counter and exits after one
pass through.
>
> You should then be able to refresh outside the loop to repaint the
form with the new values.
>
> Rob
>
> --- On Mon, 1/19/09, wamitch1012 <wmitchell@...> wrote:
>
> From: wamitch1012 <wmitchell@...>
> Subject: [Vantage] Error on Save
> To: vantage@yahoogroups.com
> Date: Monday, January 19, 2009, 11:45 AM
>
>
>
>
>
>
> I have created a customised sheet within the JobOpDtl form.
> That sheet contains three fields which I would like to populate
with
> data and save back to the database.
> The section of my code (called from a button click event) which I'm
> attempting to use to do this is as follows:
>
> Dim edv As EpiDataView = CType(oTrans. EpiDataViews
> ("JobOpDtl") ,EpiDataView)
> edv.dataView( edv.Row). BeginEdit( )
> edv.dataView( edv.Row)( "Character01" ) = txtInstr1.text
> edv.dataview( edv.Row)( "Number20" ) = integer.parse(
nedEpiCustom7. text)
> edv.dataview( edv.Row)( "Number19" ) = integer.parse(
nedEpiCustom8. text)
> edv.dataview( edv.row). EndEdit()
> oTrans.NotifyAll( true)
> oTrans.Refresh
> edv.dispose
>
> When I test the changes, it crashes, giving the following error:
>
> Object reference not set to an instance of an object.
>
> Stack Trace
> ===========
> at Epicor.Mfg.UI. FrameWork. EpiDataView. processRowRules( Int32
RowNo,
> Boolean justGettingProps)
> at Epicor.Mfg.UI. FrameWork. EpiDataView. Notify(EpiNotify Args
args)
> at Epicor.Mfg.UI. FrameWork. EpiNumericEditor .TextValidate( Object
> sender, CancelEventArgs ea)
>
> At this point it gets itself into a loop and I have to Ctrl-Alt-Del
> to get out of it.
>
> I'm obviously doing something fundamentally wrong here, can someone
> maybe help by pointing out where ?
>
> Many thanks
>
> WM
>