1 Reply Latest reply: Oct 25, 2011 11:10 AM by alwu-Oracle RSS

    Database Query

    887107
      Hi everyone
      in http://download.oracle.com/docs/cd/E16338_01/appdev.112/e11828/sem_jena.htm#CBBCIJAD there are examples query the data that there are inserted throw java.
      there is any example that i can query the data that i have saved in my Oracle Database?
      thx a alot
        • 1. Re: Database Query
          alwu-Oracle
          Hi,

          There are many examples in that document. You can search for "QueryFactory.create"

          e.g. Example 7-5

          String queryString =
          " *SELECT ?subject ?prop ?object WHERE { ?subject ?prop ?object }* ";

          Query query = QueryFactory.create(queryString) ;
          QueryExecution qexec = QueryExecutionFactory.create(query, model) ;

          try {
          int iTriplesCount = 0;
          ResultSet results = qexec.execSelect() ;
          for ( ; results.hasNext() ; ) {
          ...

          Thanks,

          Zhe