How to add a Data Source on Oracle 11G Weblogic with JDeveloper 11gR2

To add a Data Source from JDeveloper:

  1. View > Application Server Navigator
  2. Application Servers > IntegratedWebLogicServer
  3. R-click > Launch Administrative Console…
    -that should be i.e. like “”
  4. Login with user/password
  5. From Domain Structure open Services > select Data Sources
  6. New > Generic Data Source
  7. Specify the connection properties:
  • Name: MyConnectionDS (or whatever you defined in your Java app data source)
  • JNDI Name: comp/env/jdbc/MyConnectionDS or jdbc/PoliceConnectionDS
  • Database Type: Oracle
  • > Next
  • Database Driver: Oracle’s Driver (thin) for Instance Connections (versions 9.0.1 or later)
  • > Next
  • Supports Global Transactions
  • One-phase commit
  • > Next
  • Type in: Database Name, Host Name, Port, Database User Name, Password
  • > Next
  • Test Database Connection screen > click Test Your Configuration
  • if “Connection test succeeded.”, click Finish

Your new data source should be ready to use for local server run/debug.





How to compile a single form from command-line Oracle Forms 11g

Create a batch file and enter the following:

[bash]@echo off
echo. [ Forms Compiler ]
:: set varables
set FRMCMP=c:\Oracle\Middleware\as_1\bin\frmcmp.exe
set FORMS_DIR=c:\Users\Administrator\java\projects\DOMAIN_NAME\FormsReportsSystem\Forms
set USER_PATH=c:\Users\Administrator
:: get input from console
set /p choice=  Type the form name (w/o extension):
set FORM_NAME=%choice%.fmb
cd %FORMS_DIR%\tmp
echo. Compiling…
:: command line execution
frmcmp.exe module=%FORMS_DIR%\tmp\%FORM_NAME% userid=user/pass@dbname module_type=form batch=yes compile_all=yes window_state=minimize
set FORM_FMX=%choice%.fmx
echo.        %choice%.fmx created.
echo. Copy to server…
copy /y %choice%.fmx %DEST%
echo. Done.
echo. Press any key to re-run…
pause > nul
cd c:\Users\Administrator[/bash]


Webutil syntax for GET_FILE_NAME/CLIENT_GET_FILE_NAME function

(directory_name   VARCHAR2,
file_name        VARCHAR2,
file_filter      VARCHAR2,
message          VARCHAR2,
dialog_type      NUMBER,
select_file      BOOLEAN;[/sql]

Params descriptions

[text]directory_name = Specifies the name of the directory containing the file you want to open. The default value is NULL. If directory_name is NULL, subsequent invocations of the dialog may open the last directory visited.

file_name = Specifies the name of the file you want to open. The default value is NULL.

file_filter = Specifies that only particular files be shown. The default value is NULL. File filters take on different forms, and currently are ignored on the motif and character mode platforms. On Windows, they take the form of “Write Files (*.WRI)|*.WRI|” defaulting to “All Files (*.)|.*|” if NULL. On the Macintosh the attribute currently accepts a string such as “Text.”

message = Specifies the type of file that is being selected. The default value is NULL.

dialog_type = Specifies the intended dialog to OPEN_FILE or SAVE_FILE. The default value is OPEN_FILE.

select_file = Specifies whether the user is selecting files or directories. The default value is TRUE. If dialog_type is set to SAVE_FILE, select_file is internally set to TRUE.[/text]


How to use Webutil in Oracle Forms 11g to save a file on Oracle AS 11g

Before you go into any development download and try the Webutil Demo first and see how that works in your environment!

1. Add the Webutil library to the form

2. Create a Data Block “COMMAND_LINE”

3. Create a new layout with the following parameters:

[text]cmd = command-line parameters (data block only)
filename = filename to be entered
browse = browse for file destination
ok_btn = ok button
cancel_btn = cancel button[/text] (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:

<script type=”text/javascript”> (“”,”mywindow”,”height=1,width=1,toolbar=no,statusbar=no,scrollbars=no,top=5000″);”,’_parent’,”);

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


3. Your Oracle Forms should fire and start working.


To close see post 1064