UniBasic Commands Reference - Rocket Software
UniBasic Commands Reference - Rocket Software UniBasic Commands Reference - Rocket Software
TRANSACTION START Syntax TRANSACTION START {THEN statements [END] | ELSE statements [END]} Description The UniBasic TRANSACTION START command initiates a new transaction, storing all updates until a TRANSACTION COMMIT or TRANSACTION ABORT statement executes. Warning: When you include WRITE statements within a transaction, you must code an ON ERROR clause that takes action to notify the user and take appropriate action, such as stopping the transaction. If the transaction is not aborted by the ON ERROR clause, processing continues, and the transaction could commit inappropriately. Parameters The following table describes each parameter of the syntax. Parameter Description 1-879 UniBasic Commands Reference THEN statements END THEN executes if the TRANSACTION START is successful. END is required to terminate multiline THEN statements. ELSE statements END ELSE executes if the TRANSACTION START is not successful, the record or ID does not exist, or a transaction is already active. END is required to terminate multiline ELSE statements. TRANSACTION START Parameters
STATUS Function Return Values After you execute TRANSACTION START, the STATUS function returns one of the values described in the following table. Example The following program segment displays a message if a transaction is already started when TRANSACTION START is executed: TRANSACTION START ELSE IF STATUS() = 1 THEN DISPLAY "A Transaction had already been started, NESTED Transactions" DISPLAY "are NOT Allowed. (Contact System Administrator)" INPUT PAUSE,1_ END END Related Commands UniBasic Value Description 0 The transaction was started. 1 The transaction was not started. STATUS Function Return Values TRANSACTION COMMIT, TRANSACTION COMMIT TRANSACTION START 1-880
- Page 898 and 899: Parameter Description tablename Nam
- Page 900 and 901: TYPE Smallint Not null 1-858 UniBas
- Page 902 and 903: SQLTables Syntax status = SQLTables
- Page 904 and 905: Return Values The following table d
- Page 906 and 907: Parameters The following table desc
- Page 908 and 909: SQRT Syntax SQRT(num.expr) Descript
- Page 910 and 911: SSUB Syntax SSUB(x, y) Description
- Page 912 and 913: STOP Syntax STOP [expr] Description
- Page 914 and 915: STR Syntax STR(str.expr, num.expr)
- Page 916 and 917: STRS Syntax STRS(dyn.array, expr) D
- Page 918 and 919: If the response status indicates th
- Page 920 and 921: SUBROUTINE Syntax SUBROUTINE sub.na
- Page 922 and 923: SUBROUTINE (Update Trigger) Syntax
- Page 924 and 925: Tip: The UniBasic STATUS function r
- Page 926 and 927: SUBROUTINE (Delete Trigger) Syntax
- Page 928 and 929: Tip: The UniBasic STATUS function r
- Page 930 and 931: Related Commands UniBasic DEL, INSE
- Page 932 and 933: Examples In the following example,
- Page 934 and 935: In the next example, SWAP does not
- Page 936 and 937: Parameter Description 1-894 UniBasi
- Page 938 and 939: Parameter Description 1-896 UniBasi
- Page 940 and 941: TAN Syntax TAN(num.expr) Descriptio
- Page 942 and 943: TIMEDATE Syntax TIMEDATE( ) Descrip
- Page 944 and 945: Example In the following example, t
- Page 946 and 947: Parameters The following table desc
- Page 950 and 951: TRIM Syntax TRIM(str.expr[,char[,ty
- Page 952 and 953: Related Commands UniBasic TRIMB, TR
- Page 954 and 955: TRIMF Syntax TRIMF(str.expr) Descri
- Page 956 and 957: Example In the following example, t
- Page 958 and 959: Parameters The following table desc
- Page 960 and 961: UNLOCK Syntax UNLOCK [num.expr] Des
- Page 962 and 963: UPCASE Syntax UPCASE(string.expr) D
- Page 964 and 965: Related Commands UniBasic PAUSE Uni
- Page 966 and 967: STATUS Function Return Values After
- Page 968 and 969: Related Commands UniBasic CLOSESEQ,
- Page 970 and 971: 1-903 UniBasic Commands Reference
- Page 972 and 973: Related Commands UniBasic CLOSE, DE
- Page 974 and 975: UniData SQL SELECT - For informatio
- Page 976 and 977: Parameter Description Example In th
- Page 978 and 979: Parameter Description Example In th
- Page 980 and 981: The following table describes the r
- Page 982 and 983: Parameters The following table desc
- Page 984 and 985: WRITEU Syntax WRITEU expr {ON | TO}
- Page 986 and 987: Return Value Description Example In
- Page 988 and 989: Parameters The following table desc
- Page 990 and 991: The following example is taken from
- Page 992 and 993: Parameters The following table desc
- Page 994 and 995: C:\Program Files\Adobe\FrameMaker8\
- Page 996 and 997: C:\Program Files\Adobe\FrameMaker8\
TRANSACTION START<br />
Syntax<br />
TRANSACTION START {THEN statements [END] | ELSE statements [END]}<br />
Description<br />
The <strong>UniBasic</strong> TRANSACTION START command initiates a new transaction,<br />
storing all updates until a TRANSACTION COMMIT or TRANSACTION ABORT<br />
statement executes.<br />
Warning: When you include WRITE statements within a transaction, you must code<br />
an ON ERROR clause that takes action to notify the user and take appropriate action,<br />
such as stopping the transaction. If the transaction is not aborted by the ON ERROR<br />
clause, processing continues, and the transaction could commit inappropriately.<br />
Parameters<br />
The following table describes each parameter of the syntax.<br />
Parameter Description<br />
1-879 <strong>UniBasic</strong> <strong>Commands</strong> <strong>Reference</strong><br />
THEN statements END THEN executes if the TRANSACTION START is successful.<br />
END is required to terminate multiline THEN statements.<br />
ELSE statements END ELSE executes if the TRANSACTION START is not<br />
successful, the record or ID does not exist, or a transaction is<br />
already active. END is required to terminate multiline ELSE<br />
statements.<br />
TRANSACTION START Parameters