Is there any way to make Clarion ABC\Legacy templates to add a LIMIT clause to the query it builds.
If not where could I manually inject that code
Select * from customer
where CloseDate=0
Order by Account
limit 15;
Is there any way to make Clarion ABC\Legacy templates to add a LIMIT clause to the query it builds.
If not where could I manually inject that code
Select * from customer
where CloseDate=0
Order by Account
limit 15;
I’m not at a computer right now, but I believe from memory you use prop:hint to do this. Check out the help for prop:hint maybe
I will check it out - thanks
Arnor posted this – Never knew there were Callback options for this
“SQLCallBackInterface” in filecb.inc
Dan Pressnell wrote a class and template years ago that added this ability. to ABC browses. I believe it is this one here:
Hi Kevin.
Do you want to do it in a browse or your own code using PROP:SQL?
Thys
I was able to get it working with a version of the code from icetips.
Using the sql/odbc callback feature
Kevin
C-415.819.1415
Communication is the key to a successful relationship.
I don’t know if I understood your question correctly but I use this statement to limit records returning from SQL by excuting Prop:SQL
SELECT *
FROM YourTableName
ORDER BY id DESC
OFFSET 10 ROWS
FETCH NEXT 3 ROWS ONLY
HTH
Regards
Thank you this is a similar approach, but I had to contend with the IDE generator and ended up hooking into the SQL callback feature for the ODBC driver which allowed me to modify the select statement.
I feel native sql driver is more reliable than ODBC as it has never failed me with clarion, and any solution I find in the Sql management studio can be applied from clarion easily with only using prop:sql.
Of course this is all from my own personal experience .
Best regards
Using PostgreSQL not MS Sql
Kevin
C-415.819.1415
Communication is the key to a successful relationship.
You did not mention this anywhere and usually SQL understood as MS SQL and normally each type SQL has a different way in dealing with such cases.
You are correct - I did seem to not mention my SQL backend. I did in all my other n+ post. Sorry. I will try and be more attentive next time
…and in other worlds, usually SQL understood as PG.
…with respect in another world PG stands for Parental Guidance but not here for sure because this is a technical forum in this WORLD so we don’t have to mention other worlds.