Home » Developer & Programmer » Forms » 'Order by' dynamically thru Forms (Forms,6i,WinXP)
'Order by' dynamically thru Forms [message #354025] Thu, 16 October 2008 02:45 Go to next message
vdsk
Messages: 41
Registered: February 2006
Location: India & UAE
Member
I am using Forms 6i. I want to do Forms to Excel stuff and I am doing this by opening a cursor and then start Excel routine using OLE2.
The user will select the 'order by' columns from a list-item
in the form.
Problem is I have given Order by clause as given below sample, but it just don't work..
How to accomplish this ??

declare
Cursor emp_cursor is
SELECT code,name,dept,desig,salary
FROM emp
order by :s1,:s2;

begin
-- excel routine
end;
Re: 'Order by' dynamically thru Forms [message #354733 is a reply to message #354025] Tue, 21 October 2008 01:10 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Use dynamic sql. Search this forum for 'dynamic sql' and 'exec_sql'.

David
Previous Topic: How To Get Windows Screen Resolution?
Next Topic: updating a table in a form and create new records
Goto Forum:
  


Current Time: Fri Sep 27 18:31:32 CDT 2024