Announcement

Collapse
No announcement yet.

Oracle SQL Cursor?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Oracle SQL Cursor?

    I have a project where I need to use a cursor. I am reading an Oracle DB and I need to send out an email to several different people giving them some stats based on their facility. I have a cursor all set up (in TOAD) to grab the information.

    Anyone have any experience with this? Is this even possible?

  • #2
    Yes it is; the Oracle JDBC package contains everything that you need. Use prepareCall to create an OracleCallableStatement, which you can then execute and retrieve the cursor from using getCursor. For most intents and purposes Oracle cursors work much the same way ResultSet objects do, so really you could have forgone all the work to create the cursor, and instead just used JDBC to handle query cursors. But it'll work either way.
    Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

    Nicholas Rupley
    Work: 949-237-6069
    Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.


    - How do I foo?
    - You just bar.

    Comment


    • #3
      You rock Nick! Do you have any examples? I'm kind of up against a wall

      Comment


      • #4
        Originally posted by appsbyaaron View Post
        You rock Nick! Do you have any examples? I'm kind of up against a wall
        The Javadoc for OJDBC is here; there are several code snippets in there. Also just doing a quick Google search: http://www.idevelopment.info/data/Pr...orExample.java
        Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

        Nicholas Rupley
        Work: 949-237-6069
        Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.


        - How do I foo?
        - You just bar.

        Comment

        Working...
        X