Progress versus Oracle using sql statements in java

I am working with a progress database and eventually want to use JSP's to present all of the data, the issue that I am currently running into is that all of the sql that I know does not work with progress (was using oracle's database last.  Is there either a site that I can use to find all of the commands that work with progress in sql or would I be better off looking into something other than sql ?

Who is Participating?
Mayank SAssociate Director - Product EngineeringCommented:
Well its always better to remove the SQL query from Java code as much as possible. Either use a PreparedStatement so that the driver handles some of the formatting for you, or better use stored procedures so that the entire SQL is contained in them. What's more? You even get better performance.
AKnibbsAuthor Commented:
I am using prepared statements, but can't seem to pull out the recid in the following code:
        String select = "Select RECID(PRO_DUCT)   from PRO_DUCT "
                  + "WHERE PRO_DUCT.ENTITY  = ? ";

         PreparedStatement pstmt = connection.prepareStatement(select);

        pstmt.setString(1, "person");
        rspstmt = pstmt.executeQuery();
        int count = 0;

        while( && count < 100)
                          System.out.println("num:" + count + ": " +rspstmt .getString("RECID(PRODUCT)")+ "   " );
I know that recid returns a 4 byte value and have tried get float as well as getInt, getString was just the last thing I tried.
AKnibbsAuthor Commented:
It seems as though all I had to do was to use getString(1) where 1 is the value's position in the output. (IE refer to it by column index)
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.