Active Query Builder support area

Alias doesn't work as expected

  • updated
  • Completed

I'm trying to set alias in a way similar to

My code looks like:

QueryRoot query = new QueryRoot(context);

query.SQL = "Select ServiceId From TimeRecord";
UnionSubQuery subQuery = query.FirstSelect();

QueryColumnList columnList = subQuery.QueryColumnList;

QueryColumnListItem ci = columnList[0];

ci.AliasString = "TestAlias";

if I run this with debugger attached, I can see that AliasString wasn't empty (that's not a big problem, but I expected it to be empty or null). And then when I assigned "TestAlias" to it, it was set to something like "NuU2" (it changes every run, and it seems like it is random string, but you should know better how it is formed in reality).

If I use BeginUpdate/EndUpdate, then my alias is kept till EndUpdate is called.

What is the proper way to use AliasString to set alias which I want instead of value forced by AQB?

Andrey Zavyalov, PM


Random aliases is the limitation of the trial version. It is not limited in any other way than this. You will get rid of them by purchasing the full version.