DataBasic Reference > Statements and Intrinsic Functions > T > TRANSQUERY Function

Comment on this topic

Documentation Comments

Use this form to comment on this topic. You can also provide any general observations about the Online Documentation, or request that additional information be added in a future release.

RealityV15.1Online Documentation (MoTW) Revision 7

TRANSQUERY Function (DataBasic) (m618703+transquery_f.htm)

To

Reality

Version

Topic

Submitted by

Company

Location

Email address

Comment

 

 

TRANSQUERY Function

Returns 1 (true) if the process executing the function is within a transaction boundary; returns 0 (false) if the process is not within a transaction boundary.

Syntax

TRANSQUERY()

Comments

TRANSQUERY checks if the process has executed a TRANSTART statement but no subsequent TRANSEND or TRANSABORT statement.

Examples

IF TRANSQUERY() THEN PRINT "INSIDE" ELSE PRINT "OUTSIDE"

If the process is within a transaction boundary, the statement prints "INSIDE"; otherwise, it prints "OUTSIDE."

TQ = TRANSQUERY()

This statement sets TQ to 1 if the process is within a transaction boundary; otherwise, it sets TQ to 0.

RealityV15.1 (MoTW) Revision 7Comment on this topic