When I dynamically create a datastore using SyntaxFromSQL (in order to generate datastore source code, based on a SQL SELECT statement), with syntax like this
string ERRORS, sql_syntax, dwsyntax_str, presentation_str
dwsyntax_str = trans_object.SyntaxFromSQL ( sql_syntax, presentation_str, ERRORS)
ds_1.Create( dwsyntax_str, ERRORS)
how can I check the names of the generated columns of datastore ds_1
? I remind you that in the case of a select statement that joins two or more tables, the resulting column names may be preceded by the relevant table name e.g. instead of getting the column name field_id
I may get a column name like: my_table_field_id
. This causes problems when later on I provide the column name (field_id
) as an argument of a GetItem
function, while the relevant datastore has named the column my_table_field_id
instead.
To make things worse, I found out that one of the reasons why I was getting different column definitions (preceded by table name) was the fact that the user's login had been assigned the sa role
!?!?!