06 July, 2011

Toad Code Template

A lot of developers waste a long time writing repeated code,So Toad offers feature named "Code Template" that I can use it to overcome this.
To use code template in editor you must press CTRL+SPACE, it will show list of reserved code template as below, Then choose the required template

Here I will clarify how creating your own code template
1) From Menu View->Toad Options It will open the below window choose from left pane Editot->Behavior and from T-List choose PL-SQL and then press edit button as below

The following window will be shown, choose code template tab and then press add code as below 

    select column
    into variable
    from table
    where where_clause;
    when no_data_found then
        --no data found exception
    when too_many_rows then
        --too many rows exception
    when others then
To use that template in editor you click CTRL+Space it will show a list of template when you choose "select" it insert code that you entered before in editor.

 You can import and export your own code template from toad at your machine to another machine using Import and Export buttons as following photo

I hope that my post is helpful and useful.
If you have any question, Feel free to ask at email mahmoud_ahmed01@yahoo.com
Mahmoud Ahmed

OAF :Formatting DateTime Fields

Use the following code to format DateTime feilds in OAF OAWebBean departureDateBean = webBean.findChildRecursive("DepartureDate"...