Hello everybody:
I'm still with my first CB app, and my current problem is:
- I create a table and put <i>CBNewID()</i> in the default value at the <i>ID</i> field (primay key)
- I create a local view of this table
- I create a form (based in <i>iBizObjForm</i>) with this local view, and the <i>iNavToolBar</i> attached to the form.
- I click on <b>New</b> button and the <b>Save</b> method is executed, so it runs <i>CBNewID()</i> procedure, and return a correct value (e.g. '5')
That's perfect! But...
- After entering all the data of the form, I click on <b>Save</b> of the toolbar and the <b>TABLEUPDATE()</b> command executes again the <i>CBNewID()</i> procedure, so my record gets the next value (e.g. '6')
That's a great problem for me, and for the child records of the one I'm writing, because they always get the first ID <b>('5')</b>, not the 'real' <b>('6')</b>.
TIA Miquel Angel Guerrero maguerrero (AT) kernelicsa .D.OT com
©2001 Miquel Angel Guerrero |