Temp-table Manager (appbuilder)

ForEachInvoiceDelete

Active Member
If you define a temp-table in here with only one database connected at the time, it shows in temp-table manager with a database prefix. EG Database.Tablename.

When it writes the code to the definitions section, it however doesn't include the database name. (Grr)

This is frustrating and misleading to say the least, because if you then connect a second database with the same table names it fails.

Im guessing that if you have both databases connected at the time of creating the temp-table it will prefix it with the correct table name. Just irritating.

/rantover
 

TheMadDBA

Active Member
Temp-Tables do not belong to databases... they are client objects and cannot have a database prefix. Just like variables or widgets.
 

ForEachInvoiceDelete

Active Member
Yeah i understand that, but for example.

Define temp-table ttcustomer like database.customer.

If you define that via appbuilder it shows the database prefix on the "like" side of the argument, but when it actually writes the code it ignores it.
 

ForEachInvoiceDelete

Active Member
Capture.jpg

so if you then connect another database thinking hey, its used db prefix all is fine.

"Unknown/ambiguous error"

if you then check the w code using proc editor its actually done

Code:
DEFINE TEMP-TABLE ttarea NO-UNDO LIKE area.
 

TheMadDBA

Active Member
Strange but not amazing... I know I have never used the TT Maint for production/meaningful code. I suspect I am in the majority :)

Not sure if there is an option or bug for that but you could check the KB to see.
 

Osborne

Active Member
In the AppBuilder Preferences-General, there is an option called "Qualify Database Fields with Database Name" and if you ensure this is checked you should see:
Code:
DEFINE TEMP-TABLE ttarea NO-UNDO LIKE botsdb.area.
 

ForEachInvoiceDelete

Active Member
Ah nice Osborne thanks, i hadn't seen that. Just frustrating that with that option not switched on, it appears to be doing it as per the screenshot.

Moved everything now and added the DB references. Just thought it was weird!
 
Top