Hi All

Thanks for your help, and now I have further questions in relation to the previous one
For now as I input one record and copy those data into other records, it comes to more than one transaction

As I'm going to hit "save" button to save this record, it means that I need to save several transactions at the same time.

How can I use tableupdate(.F.) function to save them as I hit "save" button once and it jumps to the next blank record as I hit "insert" button? Thanks

Sam.

Re: How to save more than one transaction as I simply hit "save" button? by Wolfgang

Wolfgang
Fri Feb 27 11:43:09 CST 2004

One thing you can do is
**************************************
*Save Button
**************************************
lnTables=aused(aTables,nMySessionNumber)
for i=1 to lnTables
select (aTables[i,1]) &&1=cAlias;2=nWorkArea
llSuccess=TableUpdate(.t.)
if !llSuccess
lnTALevels=TXNLEVEL()
FOR iLevel=1 to lnTALevels
Rollback
endfor iLevel
exit
endif
endfor i
IF llSuccess && all TableUpdates were successfully
lnTALevels=TXNLEVEL()
FOR iLevel=1 to lnTALevels
END TRANSACTION && All changes in the table which are
involved in this transaction are made permament
endfor iLevel
ENDIF

--
_________________

MFG
Wolfgang Schmale

MS Visual FoxPro MVP

--------------------------------
"Brian Chang" <anonymous@discussions.microsoft.com> schrieb im Newsbeitrag
news:0149A9A2-5106-400F-A514-6FDC7F27235A@microsoft.com...
> Hi All,
>
> Thanks for your help, and now I have further questions in relation to the
previous one.
> For now as I input one record and copy those data into other records, it
comes to more than one transaction.
>
> As I'm going to hit "save" button to save this record, it means that I
need to save several transactions at the same time.
>
> How can I use tableupdate(.F.) function to save them as I hit "save"
button once and it jumps to the next blank record as I hit "insert" button?
Thanks.
>
> Sam.


Re: How to save more than one transaction as I simply hit "save" button? by anonymous

anonymous
Fri Feb 27 20:11:05 CST 2004

Thanks for your code
But I want to make something more clear.
At the first line of your code
InTables = aused(aTables, nMySessionNumber

What should I put in a variable 'aTable'? Is that an array name I defined
What about nMySessionNumber?

Thank you
Brian