main logo
Subject: Re: Best Practise - Creating Default records, .New() .Save() doesn't, INSERT INTO does
Author: Ed Leafe
Posted: 2002/02/14 15:27:36
 
View Entire Thread
New Search


<i><font color="#663300">What was happening is that using new() save(). I do get a new() record and I populate with the replace command and save() after this a browse will show a blank record.</font></i>

What you need to do is add a SET STEP ON in your bizobj's Save() method, and step through the code to find out why it isn't getting saved. Check the view itself; make sure that the values are what they should be.

<i><font color="#663300">Now onto the next record, I again get a new() but when the replace occurs it occurs in the previous record and the new record is blank. so on...</font></i>

Again, you need to see why the record pointer is moving. There should be no reason for it to move after a call to New().

<i><font color="#663300">I will change the code from aApp to the BO, it didn't strike me I'm still thinking procedurarily rather than OOP.</font></i>

Not so much procedurally, but rather in a way that makes long-term maintenance difficult. Code should always be placed in the object that is "responsible" for the action.
<font color="#cc0000"> ___/
/
__/
/
____/</font>
Ed Leafe
 
©2002 Ed Leafe
<-- Prior Message New Search Next Message -->