Help Center > > Developer Guide> Guide: JDBC- or ODBC-Based Development> JDBC-Based Development> Loading a Driver

Loading a Driver

Updated at: Sep 17, 2021 GMT+08:00

Load the database driver before creating a database connection.

You can load the driver in the following ways:

  • Implicitly loading the driver before creating a connection in the code: Class.forName ("org.postgresql.Driver")
  • Transferring a parameter during the JVM startup: java -Djdbc.drivers=org.postgresql.Driver jdbctest
    • jdbctest is the name of a test application.
    • If gsjdbc200.jar is used, change the driver class name to "com.huawei.gauss200.jdbc.Driver".

Did you find this page helpful?

Submit successfully!

Thank you for your feedback. Your feedback helps make our documentation better.

Failed to submit the feedback. Please try again later.

Which of the following issues have you encountered?

Please complete at least one feedback item.

Content most length 200 character

Content is empty.

OK Cancel