Re: Inserting a record..help

From: Ed Maldonado <maldonad_at_motu370e.comm.mot.com>
Date: Fri, 9 Jul 1993 15:17:28 GMT
Message-ID: <1993Jul9.151728.3285_at_lmpsbbs.comm.mot.com>


In article <1993Jul9.055144.12885_at_uws.EDU.AU> roleary_at_st.nepean.uws.edu.au (Rocqueforte OLeary) writes:
>G'day,
>I'm having some trouble inserting a record into a table in SQLforms
>v3.0. I've defined a block called deleter which pops up when the user
>decides to delete a particular record. The base table is a table called
>del_assets, which contains d_reference, d_person & d_reason. I pass
>the current reference number to d_reference, d_person = user, and
>the user enters the d_reason. Problem is this. Once the user has
>entered reason, I say commit; to commit these changes to del_assets.
>No problem, changes are posted to del_assets. But if I then delete
>another item, the changes I just saved are overwritten by the newly
>deleted item. i.e. del_assets only holds 1 record. I tried putting
>an insert clause before the delete, but this cause two copies of
>each item to be deleted to be put in del_assets. I then tried removing
>the commit, and getting the user to except changes at very end.
>Unsatisfactory because my boss doesn't like it, and the last record
>is written twice.

	Try using a CLEAR_RECORD after your commit of that block. You see
	by commiting the record you did not clear the record or move the cursor
	to a new record...the cursor is still on that record so by passing
	d_reference and d_reason to this block you updateing the previously
	committed record.
						Ed

>Does anyone out there have a solution to this problem ?
>Cheers,
>--
> ,-_|\ *********** Rocqueforte Daemaen Alexander O'Leary ***********
> / \ B.App.Sci.(Comp),BPFH,Uni. Of Western Sydney,Nepean,Australia
> \_.--_/ E-Mail: roleary_at_st.nepean.uws.edu.au Work Phone: 047 360 773
> o "Boldly going where angels fear to tread."
Received on Fri Jul 09 1993 - 17:17:28 CEST

Original text of this message