Is there any way to execute the SQL statements in class objects ?
I guess the compiler has already answered your question.
SQL is not supported in classes. (13476)
It has intentionally been left out. The SQL support in the ABL is limited. But if you really have to, run a .p file that contains your SQL from a class.
Does select statement supports dynamic where clause in .p program ?
So that I can pass where string as a input to the procedure from class method and count the number of records.
select * from TT where ( cstring)
Yes, i am using dynamic queries too but the SELECT statement is giving result much faster than the dynamic queries. So we are planning to use the SELECT statement.
Do NOT use SQL inside the 4gl. That is the road to hell.
If you think it is faster you are almost certainly doing something very wrong with your 4gl code. Post some examples of comparative code and I'm sure we can help you find a better way.