Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Fayez

Pages: [1]
Finally the application developers are entering the age of Zero Line Coding.

Microsoft is introducing a new tool named Visual Studio LightSwitch, which is aimed at building data-driven applications, like an inventory system or a basic customer relationship management system incredibly easy.

LightSwitch automatically generates the user interface in Silverlight for a data source and, with no code, you can create, read, update and delete data.

Watch the demos and see how you can build, customize, and extend LightSwitch applications including changing themes, templates, adding custom validation, providing smart data types, and deploying to Windows Azure.

Oracle Academy / Age Calculator Function
« on: October 20, 2010, 12:25:59 PM »
Dear All,

Here is a function for calculating your age.

        v1      NUMBER := CEIL((SYSDATE - dob) + 1);
        v2      NUMBER := FLOOR(v1/365);
        v3      NUMBER := FLOOR((v1 - v2*365)/30);
        v4      NUMBER := v1 - v2*365 - v3*30;
        v5      VARCHAR2(5);
        v6      VARCHAR2(6);
        v7      VARCHAR2(4);
      IF v2 > 1 THEN
               v5 := 'years';
               v5 := 'year';
      END IF;
      IF v3 > 1 THEN
               v6 := 'months';
               v6 := 'month';
      END IF;
      IF v4 > 1 THEN
               v7 := 'days';
               v7 := 'day';
      END IF;
       RETURN v2||' '||v5||' '||v3||' '||v6||' '||v4||' '||v7;

select age_calculator('25-dec-1985') from dual;

Oracle Academy / Some Oracle Users in Bangladesh
« on: August 25, 2010, 03:50:32 PM »
At Banking Sector

1.   Eastern Bank Ltd
2.   Dhaka Bank Ltd
3.   Dutch-Bangla Bank Ltd
4.   The City Bank Ltd
5.   BRAC Bank Ltd
6.   State Bank of India
7.   Prime Bank Ltd
8.   Exim Bank Ltd
9.   Bank of Asia Ltd
10.   Standard Bank Ltd
11.   Basic Bank Ltd
12.   Mutual Trust Bank Ltd
13.   NCC Bank Ltd
14.   Al-Arafa Bank Ltd
15.   Southeast Bank Ltd

At Telecom Sector

1. Grameen Phone
2. Warid Telecom
3. Robi Bangladesh
4. City Cell
5. Teletalk Bangladesh
6. Banglalink

Java Forum / The Basic Steps to Connect Oracle and Java Program
« on: August 23, 2010, 03:40:38 PM »
Here, I will show you what the steps to make a connection between Oracle database and your Java program. To do this work, you need the JDBC (Java DataBase Connectivity) driver. The file name of Oracle's JDBC driver is or classes12.jar. By default, Oracle have included this driver at the software installation process. Its location is in the ORACLE_HOME\jdbc\lib directory. For example, if our ORACLE_HOME is C:\Oracle\Ora90 then the JDBC driver will be placed in C:\Oracle\Ora90\jdbc\lib directory.

Make sure to set the Java CLASSPATH correctly. Here is the command line to do it.
(Note: Assume the ORACLE_HOME is C:\Oracle\Ora90)

set CLASSPATH=.;C:\Oracle\Ora90\jdbc\lib\classes12.jar


set CLASSPATH=.;C:\Oracle\Ora90\jdbc\lib\

In addition, you can also set the CLASSPATH in your autoexec.bat file on your Windows operating system.

Now, just follow these steps:

STEP 1. Import the java.sql package into your program.

import java.sql.*;

The syntax above will import all classes in the java.sql package. If you want to import a few of them, you can write the syntax like this

import java.sql.Driver;
import java.sql.DriverManager;
import java.sql.Connection;

It only imports the Driver, DriverManager, and Connection class into your Java program.

STEP 2. Load the Oracle's JDBC driver.

There are two ways to load your JDBC driver. The first, use the forName() method of java.lang.Class class.


And the second way is use the registerDriver() method of DriverManager class.

DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());

STEP 3. Create a Connection object.

To create a Connection object, use the getConnection() method of DriverManager class. This method takes three parameters: URL, username, and password.

Connection conn =
"jdbc:oracle:thin:@mylaptop:1521:ORCL",       // URL
"scott",       // username
"tiger"        // password

STEP 4. Create a Statement object.

The Statement object can be created by call the createStatement() method of Connection object that you made before. So, you can write the following code

Statement mystat = conn.createStatement();

STEP 5. Execute your SQL statement.

After you create a Statement object successfully, you can execute a query (SELECT statement) from your Java program using the executeQuery() method of Statement class. The result of execution process will be stored in ResultSet object, so you need to declare an object of ResultSet first. Here is the code.

ResultSet rs = mystat.executeQuery("SELECT EMPNO, ENAME FROM EMP");

STEP 6. Display your data.

The next step is display your data using the looping control.

while ( {
rs.getInt(1) +      // first column
"\t" +              // the horizontal tab
rs.getString(2)     // second column

STEP 7. Close your statement and connection.


Here is the complete code.

import java.sql.*;

class SimpleOraJava {
  public static void main(String args[]) throws SQLException {
      new oracle.jdbc.driver.OracleDriver()
    String serverName = "mylaptop";
    int port = 1521;
    String user = "scott";
    String password = "tiger";
    String SID = "ORCL";
    String URL = "jdbc:oracle:thin:@" + serverName + ":" + port + ":" + SID;
    Connection conn = DriverManager.getConnection(URL, user, password);
    Statement stat = conn.createStatement();
    ResultSet rs = stat.executeQuery(SQL);
    while ( {
        rs.getInt(1) +
        "\t" +

Java Forum / Re: JDeveloper - the java-based Development tool
« on: August 11, 2010, 10:09:11 AM »
Jdeveloper is not the name of any professional certification course. it is a freeware IDE from Oracle. It offers features for development in Java, XML, SQL and PL/SQL, HTML, JavaScript, BPEL and PHP. JDeveloper covers the full development lifecycle from design through coding, debugging, optimization and profiling to deploying.

Java Forum / JDeveloper - the java-based Development tool
« on: August 10, 2010, 10:00:42 AM »
Oracle JDeveloper is a free integrated development environment that simplifies the development of Java-based SOA applications and user interfaces with support for the full development life cycle.

you can get JDeveloper  resources by the link bellow:

Oracle Academy / DIU has got 6 DBA from Oracle Academy
« on: August 04, 2010, 10:01:21 AM »
It's My pleasure to inform that 6 students has successfully completed Oracle Database 10g: Database Administrator from Oracle Academy. This course include SQL,Administration 1 and Administration 2. 2 of them already have passed the OCA exam and one passed SQL exam.

Pages: [1]