forked from docs/doc-exports
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com> Co-authored-by: Lu, Huayi <luhuayi@huawei.com> Co-committed-by: Lu, Huayi <luhuayi@huawei.com>
14 lines
1.1 KiB
HTML
14 lines
1.1 KiB
HTML
<a name="EN-US_TOPIC_0000001233563295"></a><a name="EN-US_TOPIC_0000001233563295"></a>
|
|
|
|
<h1 class="topictitle1">Loading a Driver</h1>
|
|
<div id="body8662426"><p id="EN-US_TOPIC_0000001233563295__aad761dbdae3142a18755e96188b06794">Load the database driver before creating a database connection.</p>
|
|
<p id="EN-US_TOPIC_0000001233563295__ac499bb5780dd4eaeb2580d1011438f6b">You can load the driver in the following ways:</p>
|
|
<ul id="EN-US_TOPIC_0000001233563295__ubd790d2e5a5c43c192c02a1c1c2a9b71"><li id="EN-US_TOPIC_0000001233563295__l96db4ecf7bd9477cb3a0d3f76cf2a095">Implicitly loading the driver before creating a connection in the code: <strong id="EN-US_TOPIC_0000001233563295__b17355821013">Class.forName ("org.postgresql.Driver")</strong></li><li id="EN-US_TOPIC_0000001233563295__l1dd4ec6c9812458db1b7207604b27579">Transferring a parameter during the JVM startup: <strong id="EN-US_TOPIC_0000001233563295__b616316121518">java -Djdbc.drivers=org.postgresql.Driver jdbctest</strong></li></ul>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="dws_04_0088.html">JDBC-Based Development</a></div>
|
|
</div>
|
|
</div>
|
|
|