Connecting using the JDBC Driver Manager
- Last Updated: March 11, 2022
- 1 minute read
- DataDirect Connectors
- JDBC
- SAP S/4HANA 6.0
- Documentation
One way to connect to a service is through the JDBC
DriverManager using the DriverManager.getConnection()
method. As the following example shows, this method specifies a string containing a
connection URL.
S/4HANA:
Connection conn = DriverManager.getConnection
("jdbc:datadirect:s4hana:ServerName=https://mycompany.s4hana.ondemand.com;
User=jsmith;Password=secret;");
BW/4HANA:
Connection conn = DriverManager.getConnection
("jdbc:datadirect:s4hana:ServerName=https://myinstance.company.com;
User=jsmith;Password=secret;");