Java – Connection String Oracle / MS-SQL / MY-SQL

Oracle

 
String databaseName = “jdbc:oracle:thin:@10.178.18.26:1521:ORCL”;
String userName = “lims”;
String password = “Admin123″;
Connection jdbcConnection = null;
jdbcConnection = DriverManager.getConnection(databaseName,userName,password);

mySQL

String databaseName = “jdbc:mysql://10.178.18.26:3306/lims”;
String userName = “root”;
String password = “Admin123″;
Connection jdbcConnection = null;
jdbcConnection = DriverManager.getConnection(databaseName,userName,password);

ms-SQL
String databaseName = “jdbc:sqlserver://10.178.18.26;Database=limstest;user=lims;Password=Admin123″;
String userName = “lims”;
String password = “Admin123″;
Connection jdbcConnection = null;
jdbcConnection = DriverManager.getConnection(databaseName,userName,password);

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.