In the Outsystem service center we got that error- "Cannot find the object "STG_VTIME" because it does not exist or you do not have permissions " but table is present in module itself and also having data when we are trying to run that query it show above error message. It does not depend in any other module.
you'll have to share your sql here, so we can help see what is going on
also : what happens if you execute the query from Service Studio ?
If I execute the query from service studio I got same error & for query please check the below Screenshot
Not sure, but I don't think we have permissions to truncate
Hi to use advance query, the syntax:
{entity}.[attribute]
regards
@Dorine Boudry is correct TRUNCATE is not supported by OutSystems.
Error is getting in preprod environment only not in prod . If truncate is not support by Outsystem then how come truncate is working in other environment?
1) are you sure you are going into the true node of that IF in production
2) you could easily test if the TRUNCATE is the problem by doing a DELETE instead
1. In development environment not getting that error but in STG & CONS environment getting error & in all env query is same as I shown.
2. Yes I tested with truncate is not working. If it is delete then it is working fine but one question is, how come truncate is working in other environment?
I'm not asking if it is the same script in all environments, but if you are sure he goes into the true branch at all. If not, than you have no proof truncate is working in any env
Hi,
Make sure you typing the correct physical name of the table.
The name of the table in the database assumes the following naming OSUSR_<3 characters representative of the module>_<table name> (e.g. OSUSR_TCC_Country).
kind regards,
Amélio Chissico
To sum up all of the above, the default OutSystems database user does not have permissions to do a TRUNCATE on a table. If you want to delete all data, use a DELETE, though yes, that may be pretty slow compared to a TRUNCATE.
It may be possible to request via OutSystems Support a database user that is allowed to TRUNCATE, and use that as the Run As user, but I'm not sure. In general, you shouldn't want to regularly TRUNCATE database tables anyway.