<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Der Blog von Benny Neugebauer &#187; Driver</title>
	<atom:link href="http://www.bennyn.de/tag/driver/feed" rel="self" type="application/rss+xml" />
	<link>http://www.bennyn.de</link>
	<description>Alles über die Informatik &#38; Co.</description>
	<lastBuildDate>Mon, 06 Feb 2012 11:49:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>JDBC Datenbankanbindung mit MySQL</title>
		<link>http://www.bennyn.de/programmierung/java/datenbankabfragen-mit-jdbc.html</link>
		<comments>http://www.bennyn.de/programmierung/java/datenbankabfragen-mit-jdbc.html#comments</comments>
		<pubDate>Tue, 09 Mar 2010 12:54:41 +0000</pubDate>
		<dc:creator>bennyn</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[Datenbank]]></category>
		<category><![CDATA[Driver]]></category>
		<category><![CDATA[JEE]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Value Objects]]></category>

		<guid isPermaLink="false">http://www.bennyn.de/programmierung/java/datenbankabfragen-mit-jdbc.html</guid>
		<description><![CDATA[MySQL-Datenbankabfrage mit der Java Database Connectivity aus der Java Enterprise Edition. Für die Verwendung wird die Bibliothek mysql-connector-java-5.1.5-bin.jar benötigt, damit der MySQL Driver für die JDBC zur Verfügung steht. Das Kürzel &#8220;VO&#8221; bezeichnet die Value Objects, welche die Datensätze in der Datenbank sind. data.CD_VO 1 2 3 4 5 6 7 8 9 10 11 [...]]]></description>
			<content:encoded><![CDATA[<p><b>MySQL-Datenbankabfrage</b> mit der <i>Java Database Connectivity</i> aus der <b>Java Enterprise Edition</b>. Für die Verwendung wird die Bibliothek <i>mysql-connector-java-5.1.5-bin.jar</i> benötigt, damit der <i>MySQL Driver</i> für die <b>JDBC</b> zur Verfügung steht. Das Kürzel &#8220;<b>VO</b>&#8221; bezeichnet die <i>Value Objects</i>, welche die Datensätze in der Datenbank sind.</p>
<p><b>data.CD_VO</b></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
</pre></td><td class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">package</span> <span style="color: #006699;">data</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">java.sql.Date</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">java.util.ArrayList</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> CD_VO
<span style="color: #009900;">&#123;</span>
    <span style="color: #000066; font-weight: bold;">int</span> id<span style="color: #339933;">;</span>
    <span style="color: #003399;">String</span> titel<span style="color: #339933;">;</span>
    <span style="color: #003399;">String</span> interpret<span style="color: #339933;">;</span>
    <span style="color: #003399;">Date</span> veroeffentlichung<span style="color: #339933;">;</span>
    <span style="color: #003399;">String</span> coverDatei<span style="color: #339933;">;</span>
    ArrayList<span style="color: #339933;">&lt;</span>song_VO<span style="color: #339933;">&gt;</span> songs<span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> CD_VO<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">id</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
        <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">titel</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span>
        <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">interpret</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span>
        <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">veroeffentlichung</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> java.<span style="color: #006633;">sql</span>.<span style="color: #003399;">Date</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">2010</span><span style="color: #339933;">-</span><span style="color: #cc66cc;">10</span><span style="color: #339933;">-</span><span style="color: #cc66cc;">10</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">coverDatei</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span>
        songs <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> ArrayList<span style="color: #339933;">&lt;</span>song_VO<span style="color: #339933;">&gt;</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> CD_VO<span style="color: #009900;">&#40;</span><span style="color: #003399;">String</span> titel, <span style="color: #003399;">String</span> interpret, <span style="color: #003399;">Date</span> veroeffentlichung, <span style="color: #003399;">String</span> coverDatei<span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        setID<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">titel</span> <span style="color: #339933;">=</span> titel<span style="color: #339933;">;</span>
        <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">interpret</span> <span style="color: #339933;">=</span> interpret<span style="color: #339933;">;</span>
        <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">veroeffentlichung</span> <span style="color: #339933;">=</span> veroeffentlichung<span style="color: #339933;">;</span>
        <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">coverDatei</span> <span style="color: #339933;">=</span> coverDatei<span style="color: #339933;">;</span>
        songs <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> ArrayList<span style="color: #339933;">&lt;</span>song_VO<span style="color: #339933;">&gt;</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000066; font-weight: bold;">void</span> setID<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">id</span><span style="color: #339933;">++;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #003399;">String</span> getCoverDatei<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">return</span> coverDatei<span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> setCoverDatei<span style="color: #009900;">&#40;</span><span style="color: #003399;">String</span> coverDatei<span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">coverDatei</span> <span style="color: #339933;">=</span> coverDatei<span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">long</span> getId<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">return</span> id<span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> setId<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> id<span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">id</span> <span style="color: #339933;">=</span> id<span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #003399;">String</span> getInterpret<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">return</span> interpret<span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> setInterpret<span style="color: #009900;">&#40;</span><span style="color: #003399;">String</span> interpret<span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">interpret</span> <span style="color: #339933;">=</span> interpret<span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #003399;">String</span> getTitel<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">return</span> titel<span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> setTitel<span style="color: #009900;">&#40;</span><span style="color: #003399;">String</span> titel<span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">titel</span> <span style="color: #339933;">=</span> titel<span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #003399;">Date</span> getVeroeffentlichung<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">return</span> veroeffentlichung<span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> setVeroeffentlichung<span style="color: #009900;">&#40;</span><span style="color: #003399;">Date</span> veroeffentlichung<span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">veroeffentlichung</span> <span style="color: #339933;">=</span> veroeffentlichung<span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p><b>repository.JdbcConnection</b></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
</pre></td><td class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">package</span> <span style="color: #006699;">repository</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">data.CD_VO</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">java.sql.Connection</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">java.sql.DriverManager</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">java.sql.PreparedStatement</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">java.sql.ResultSet</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">java.sql.SQLException</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">java.util.LinkedList</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> JdbcConnection
<span style="color: #009900;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">protected</span> <span style="color: #003399;">Connection</span> getConnection<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">try</span>
        <span style="color: #009900;">&#123;</span>
            <span style="color: #000000; font-weight: bold;">Class</span>.<span style="color: #006633;">forName</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;com.mysql.jdbc.Driver&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #000000; font-weight: bold;">return</span> <span style="color: #003399;">DriverManager</span>.<span style="color: #006633;">getConnection</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;jdbc:mysql://localhost/jee&quot;</span>, <span style="color: #0000ff;">&quot;root&quot;</span>, <span style="color: #0000ff;">&quot;password&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
        <span style="color: #000000; font-weight: bold;">catch</span><span style="color: #009900;">&#40;</span><span style="color: #003399;">SQLException</span> excSQL<span style="color: #009900;">&#41;</span>
        <span style="color: #009900;">&#123;</span>
            <span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Fehler beim Aufbau der SQL-Verbindung:&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            excSQL.<span style="color: #006633;">printStackTrace</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #000000; font-weight: bold;">return</span> <span style="color: #000066; font-weight: bold;">null</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
        <span style="color: #000000; font-weight: bold;">catch</span><span style="color: #009900;">&#40;</span><span style="color: #003399;">ClassNotFoundException</span> excCNF<span style="color: #009900;">&#41;</span>
        <span style="color: #009900;">&#123;</span>
            <span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Treiber-Manager nicht gefunden.&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            excCNF.<span style="color: #006633;">printStackTrace</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #000000; font-weight: bold;">return</span> <span style="color: #000066; font-weight: bold;">null</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> findAllTest<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        <span style="color: #003399;">Connection</span> con <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">null</span><span style="color: #339933;">;</span>
        <span style="color: #003399;">PreparedStatement</span> ps <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">null</span><span style="color: #339933;">;</span>
        <span style="color: #003399;">ResultSet</span> rs <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">null</span><span style="color: #339933;">;</span>
        <span style="color: #003399;">String</span> sqlStr <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;SELECT * FROM cd&quot;</span><span style="color: #339933;">;</span>
        LinkedList<span style="color: #339933;">&lt;</span>cd_VO<span style="color: #339933;">&gt;</span> voList <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> LinkedList<span style="color: #339933;">&lt;</span>cd_VO<span style="color: #339933;">&gt;</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        CD_VO vo<span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #000000; font-weight: bold;">try</span>
        <span style="color: #009900;">&#123;</span>
            con <span style="color: #339933;">=</span> getConnection<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            ps <span style="color: #339933;">=</span> con.<span style="color: #006633;">prepareStatement</span><span style="color: #009900;">&#40;</span>sqlStr<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            rs <span style="color: #339933;">=</span> ps.<span style="color: #006633;">executeQuery</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
            <span style="color: #000000; font-weight: bold;">while</span><span style="color: #009900;">&#40;</span>rs.<span style="color: #006633;">next</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
            <span style="color: #009900;">&#123;</span>
                vo <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> CD_VO<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                vo.<span style="color: #006633;">setId</span><span style="color: #009900;">&#40;</span> rs.<span style="color: #006633;">getInt</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;id&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                vo.<span style="color: #006633;">setInterpret</span><span style="color: #009900;">&#40;</span> rs.<span style="color: #006633;">getString</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;interpret&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                vo.<span style="color: #006633;">setTitel</span><span style="color: #009900;">&#40;</span> rs.<span style="color: #006633;">getString</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;titel&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                vo.<span style="color: #006633;">setVeroeffentlichung</span><span style="color: #009900;">&#40;</span> rs.<span style="color: #006633;">getDate</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;veroeffentlichung&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                vo.<span style="color: #006633;">setCoverDatei</span><span style="color: #009900;">&#40;</span> rs.<span style="color: #006633;">getString</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;coverdatei&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                voList.<span style="color: #006633;">add</span><span style="color: #009900;">&#40;</span>vo<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #666666; font-style: italic;">// Testausgabe:</span>
                <span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span> vo.<span style="color: #006633;">getId</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span> vo.<span style="color: #006633;">getInterpret</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span> vo.<span style="color: #006633;">getTitel</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span> vo.<span style="color: #006633;">getVeroeffentlichung</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span> vo.<span style="color: #006633;">getCoverDatei</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span>
        <span style="color: #009900;">&#125;</span>
        <span style="color: #000000; font-weight: bold;">catch</span><span style="color: #009900;">&#40;</span><span style="color: #003399;">SQLException</span> excSQL<span style="color: #009900;">&#41;</span>
        <span style="color: #009900;">&#123;</span>
            <span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Fehler beim Abruf aus der SQL-Verbindung:&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            excSQL.<span style="color: #006633;">printStackTrace</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
        <span style="color: #000000; font-weight: bold;">finally</span>
        <span style="color: #009900;">&#123;</span>
            <span style="color: #000000; font-weight: bold;">try</span>
            <span style="color: #009900;">&#123;</span>
                <span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span> ps <span style="color: #339933;">!=</span> <span style="color: #000066; font-weight: bold;">null</span> <span style="color: #009900;">&#41;</span>    ps.<span style="color: #006633;">close</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span> con <span style="color: #339933;">!=</span> <span style="color: #000066; font-weight: bold;">null</span> <span style="color: #009900;">&#41;</span>   con.<span style="color: #006633;">close</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span>
            <span style="color: #000000; font-weight: bold;">catch</span><span style="color: #009900;">&#40;</span><span style="color: #003399;">SQLException</span> excSQL<span style="color: #009900;">&#41;</span>
            <span style="color: #009900;">&#123;</span>
                <span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Fehler beim Abbau der SQL-Verbindung:&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                excSQL.<span style="color: #006633;">printStackTrace</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span>
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p><b>repository.Main</b></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
</pre></td><td class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">package</span> <span style="color: #006699;">repository</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Main
<span style="color: #009900;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000066; font-weight: bold;">void</span> main<span style="color: #009900;">&#40;</span><span style="color: #003399;">String</span> args<span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        JdbcConnection test <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> JdbcConnection<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        test.<span style="color: #006633;">findAllTest</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<div class="aligncenter"><a href="http://www.bennyn.de/wp-content/uploads/2010/03/Java-Database-Connectivity.png"><img src="http://www.bennyn.de/wp-content/uploads/Java-Database-Connectivity-300x187.png" alt="" title="Java Database Connectivity" width="300" height="187" class="size-medium wp-image-820" /></a><br/><i>Java Database Connectivity in Aktion mit phpMyAdmin und NetBeans</i></div>
]]></content:encoded>
			<wfw:commentRss>http://www.bennyn.de/programmierung/java/datenbankabfragen-mit-jdbc.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Automatische Treibersuche</title>
		<link>http://www.bennyn.de/hardware/automatische-treibersuche.html</link>
		<comments>http://www.bennyn.de/hardware/automatische-treibersuche.html#comments</comments>
		<pubDate>Sun, 29 Nov 2009 22:35:49 +0000</pubDate>
		<dc:creator>bennyn</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Microsoft Windows XP]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Amilo]]></category>
		<category><![CDATA[Driver]]></category>
		<category><![CDATA[Fujitsu]]></category>
		<category><![CDATA[Pi 2540]]></category>
		<category><![CDATA[Siemens]]></category>
		<category><![CDATA[Treiber]]></category>

		<guid isPermaLink="false">http://www.bennyn.de/?p=461</guid>
		<description><![CDATA[Das Suchen nach Treibern kann Schwierigkeiten bereiten, sofern der Hersteller das gewünschte Betriebssystem nicht unterstützt. Zum Glück gibt es bereits automatisierte Programme, die einem die Suche nach dem richtigen Treiber erleichtern. Für einen Bekannten mit einem Fujitsu Siemens Amilo Notebook Pi 2540 sollte ich nach Treibern für Windows XP (32-bit) suchen. Da dieses OS nicht [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Das Suchen nach Treibern kann Schwierigkeiten bereiten</strong>, sofern der Hersteller das gewünschte Betriebssystem nicht unterstützt. Zum Glück gibt es bereits automatisierte Programme, die einem die Suche nach dem richtigen Treiber erleichtern. Für einen Bekannten mit einem <strong>Fujitsu Siemens Amilo Notebook Pi 2540</strong> sollte ich nach Treibern für <strong>Windows XP</strong> (32-bit) suchen. Da dieses OS nicht von FSC unterstützt wird, habe ich <strong>DriverMax 5.31 Pro</strong> und <strong>Driver Genius Professional Edition 9</strong> ausprobiert.</p>
<p style="text-align: center;"><a class="lightbox" title="Driver Genius Professional Edition" href="http://localhost/bennyn.de/wp-content/uploads/2010/01/Driver-Genius-Professional-Edition.png"><img class="aligncenter size-full wp-image-532" title="Driver Genius Professional Edition" src="http://localhost/bennyn.de/wp-content/uploads/2010/01/Driver-Genius-Professional-Edition.png" alt="" width="586" height="459" /></a></p>
<p><strong>Bei einem direkten Vergleich dieser beiden kostenpflichtigen Produkte,</strong> zieht DriverMax deutlich den Kürzeren. Während Driver Genius selbst unbekannte Hardware sofort erkannte, wusste DriverMax nicht einmal was für eine Grafikkarte im Amilo Pi 2540 steckt. Dazu kommt, das man bei DriverMax 5 für das zeitgleiche Herunterladen mehrerer Dateien, ganz schön viele Klicks benötigt, während sich in Driver Genius 9 diesselbe Funktion mit nur einem Button erledigen lässt. Auch der Export von Treibern als Zip-Archiv bleibt der Driver Genius Professional Edition 9 vorbehalten. Somit verdient sich dieser Treiber-Downloader den eindeutigen Sieg.</p>
<p><strong>Für alle Besitzer eines FSC Amilo Pi 2540 Laptops,</strong> die noch auf der Suche nach passenden Windows XP-Treibern sind, folgt eine geschmälerte Liste mit der verbauten Hardware und den zu verwendenden Treiber:</p>
<blockquote><p>Grafikkarte: ATI Mobility Radeon HD 2400<br />
ATI Catalyst Display Driver 8.491</p>
<p>Netzwerkkarte: Realtek RTL8139/810x Family Fast Ethernet NIC<br />
Realtek GbE &amp; FE Ethernet PCI-E NIC Driver</p>
<p>WLAN: Atheros AR5007EG Wireless Network Adapter<br />
Atheros AR5xxx AR9xxx Series Wireless Network Card Driver</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.bennyn.de/hardware/automatische-treibersuche.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

