[Progress Communities] [Progress OpenEdge ABL] Forum Post: RE: DBTASKID(1) gives ? (NULL)

Status
Not open for further replies.
S

SJProgress

Guest
While I am sure we only connect to one database and DBTASKID(1) / DBTASKID("DICTDB") and DBTASKID("myDBName") should give the same result for below code: CREATE RepData. ASSIGN RepData.RepDataID = NEXT-VALUE(RepdataID) RepData.DTCreate = NOW RepData.TransID = DBTASKID(1) / DBTASKID("DICTDB") / DBTASKID("myDBName") . What do you think is the most appropriate/reliable variant of DBTASKID() to securely hit the database that holds the transaction for table RepData? (we do not use preceeding database aliases in our code.) - DBTASKID("myDBName") is no good solution as it will break in cases where I connect to the database with some alias. - DBTASKID(1) will break, if I connect to two databases (which we currently do not do - but just in case) and databse with table RepData is DB2 - DBTASKID("DICTDB") will break too, if I connect two databases in wrong order (I assume) Would it be possible to query the database alias or number that table "RepData" from my transation is in?

Continue reading...
 
Status
Not open for further replies.
Top