78
Views
11
Comments
Error: Cannot find the table because it does not exist

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.


2021-09-06 15-09-53
Dorine Boudry
 
MVP

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 ?

UserImage.jpg
Pranjali Bhondave

If I execute the query from service studio I got same error & for query please check the below Screenshot

 

2021-09-06 15-09-53
Dorine Boudry
 
MVP

Not sure, but I don't think we have permissions to truncate

2025-01-09 14-56-57
IQ78

Hi to use advance query, the syntax:

{entity}.[attribute]

regards

2024-07-05 14-16-55
Daniël Kuhlmann
 
MVP

@Dorine Boudry is correct TRUNCATE is not supported by OutSystems.

UserImage.jpg
Pranjali Bhondave

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? 


2021-09-06 15-09-53
Dorine Boudry
 
MVP


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

UserImage.jpg
Pranjali Bhondave

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? 

2021-09-06 15-09-53
Dorine Boudry
 
MVP

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

2019-03-28 15-56-23
Amélio Dánio Paulo Chissico

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

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

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.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.