You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by bu...@apache.org on 2013/08/23 23:18:40 UTC
svn commit: r875906 - in /websites/staging/jena/trunk/content: ./
documentation/jdbc/index.html
Author: buildbot
Date: Fri Aug 23 21:18:40 2013
New Revision: 875906
Log:
Staging update by buildbot for jena
Modified:
websites/staging/jena/trunk/content/ (props changed)
websites/staging/jena/trunk/content/documentation/jdbc/index.html
Propchange: websites/staging/jena/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Fri Aug 23 21:18:40 2013
@@ -1 +1 @@
-1517042
+1517043
Modified: websites/staging/jena/trunk/content/documentation/jdbc/index.html
==============================================================================
--- websites/staging/jena/trunk/content/documentation/jdbc/index.html (original)
+++ websites/staging/jena/trunk/content/documentation/jdbc/index.html Fri Aug 23 21:18:40 2013
@@ -174,10 +174,16 @@ changing the connection URL appropriatel
<h3 id="making-a-connection">Making a Connection</h3>
<p>Firstly we should ensure that the driver we wish to use is registered with the JDBC driver manager, a static
method is provided for this:</p>
-<p>MemDriver.register();</p>
+<div class="codehilite"><pre><span class="n">MemDriver</span><span class="p">.</span><span class="n">register</span><span class="p">();</span>
+</pre></div>
+
+
<p>Once this is done we can then make a JDBC connection just be providing an appropriate connection URL:</p>
-<p>// Make a connection using the In-Memory driver starting from an empty dataset
- Connection conn = DriverManager.getConnection("jdbc:jena:men:empty=true");</p>
+<div class="codehilite"><pre><span class="c1">// Make a connection using the In-Memory driver starting from an empty dataset</span>
+<span class="n">Connection</span> <span class="n">conn</span> <span class="o">=</span> <span class="n">DriverManager</span><span class="p">.</span><span class="n">getConnection</span><span class="p">(</span><span class="s">"jdbc:jena:men:empty=true"</span><span class="p">);</span>
+</pre></div>
+
+
<p>Now we can go ahead and use the connection as you would normally.</p>
<h3 id="making-queries">Making Queries</h3>
<p>You make queries as you would with any JDBC driver, the only difference being that the queries must be SPARQL:</p>