How to create a simple Backup script using windows HTA

Prerequisites:

  • a notepad (I recommend: notepad++)
  • some HTML knowledge
  1. Start a simple HTML page and add the following as the main structure:[xml]<head>
    <title>Backup Reminder</title>
    <HTA:APPLICATION
    APPLICATIONNAME=”Backup Reminder”
    ID=”myware”
    VERSION=”1.0″
    CAPTION=”yes”
    BORDER=”normal”
    SYSTEMMENU=”yes”
    MAXIMIZEBUTTON=”no”
    MINIMIZEBUTTON=”no”
    ICON=”gumware.ico”
    SCROLL=”no”
    SCROLLFLAT=”yes”
    SINGLEINSTANCE=”yes”
    CONTEXTMENU=”yes”/><style>
    img{border: 0px}
    input{color: blue; background-color: white; font-variant:small-caps;
    font-family: Arial,Helvetica,sans-serif; border: 1px solid blue}
    H1,H2,H3,H4,H5,H6,P,BODY,UL{font-family: Arial, Helvetica, sans-serif}
    </style>
    </head>[/xml] (more…)

How to open Oracle Forms URL and then hide its IE started window

You need to open an Oracle Forms 11g url, which in turn will open a new IE window -but you want to somehow get rid of the first IE window.

1. Create a new html file i.e. “openWindow.html”, under %ORACLE_HOME%\forms\java\ as below:

[html]<html>
<body>
<script type=”text/javascript”>
window.open (“http://192.168.1.1:8090/forms/frmservlet?config=webutil”,”mywindow”,”height=1,width=1,toolbar=no,statusbar=no,scrollbars=no,top=5000″);
window.open(”,’_parent’,”);
setTimeout(‘self.close();’,3000);
</script>
</body>
</html>[/html]

Note: top = 5000 sets the window top position at +5000, which places it outside a typical windows screen size.

2. Open an IE window and enter the following URL into the address

[text]http://192.168.1.1:8090/forms/java/openWindow.html[/text]

3. Your Oracle Forms should fire and start working.

 

To close see post 1064

How to create a Servlet and use it from a JSP page (ADF 10g)

Create the Servlet

  1. Right-click on the package you need it for and select New…
  2. From the new gallery select Web-Tier > Servlets on the left and on the right select HTTP Servlet
  3. Click Next and give the Servlet:
  1. Class name (ImageServlet)
  2. the Package it will reside in
  3. select doGet() method to implement
  • click Next and set the Mapping details:
    1. Name: the name to use in the application
    2. Url pattern: the url path to use in jsp pages (/somePath)
  • Finish
  • In the class, complete the method doGet() with what the servlet should do. If it is a DB query i.e.:

    We need a connection to the DB to make a tranaction…

    [java]

    public static Connection getConnection() throws Exception {

    String amDef = “bc.datamodel.common”;
    String config = “ModelNameLocal”;
    Connection con = null;
    ApplicationModule am = null;

    try {
    am = Configuration.createRootApplicationModule(amDef, config);
    con = ((DBTransactionImpl)am.getTransaction()).getPersistManagerConnection();
    } finally {
    Configuration.releaseRootApplicationModule(am, true);
    }

    return con;

    }

    [/java] (more…)

    phpBB3 forum on Oracle DB

    When you create a phpBB3 forum and use Oracle as the database host. make sure that you are using Oracle Database 10g or later as previous releases may cause unpredictable errors, i.e.:

    SELECT a.*, b.*, ac.something…
    FROM phpb3_forums a, phpb3_topics b…
    LEFT JOIN phpb3_topics_watch ac ON …
    WHERE a.topic_….

    …will cause a ORA-00904: “A”: invalid identifier [904] as it seems it can not utilise both a.* and b.*