This content has been marked as final. Show 2 replies
-> After execution, Result set needs to be exported into an Excel file.What is it now? A CSV or a XLS(X) file?
You should take a look at exec_sql and text_io (CSV) or ole2 (XLS) (or their CLIENT_ counterparts when using a web-based version). Search your forms builder manual and/or the forums on how to use them.
Note that the webutil client_xyz functions are significantly slower then the server implementations, so if you are on webforms you might think about generating the files on the server and transfer them to the client.
as you are using text item to write SQL query by the user
so for that you need to use the exec_sql package to parse the text items query and get definitions and values of the columns being
resulted in the result set of the query.
once your query is execute to the desired connection then you need to use fetch the result to the CSV file by use of the TEXT_io package
which will open the text file with .csv extension and you have to pass the each line to that text file with comma separated values as "ss","rr" etc.
or you can use the ole2 package to call the excel application and then fetch the data of exe_sql query to that.