Connecting MS SQL Server to Java Net Beans (Filipino)

preview_player
Показать описание
I dont know if this tutorial will work on you. But I hope that this steps will help you.

Steps in connecting Java to local Database ms sql

1. Install ms sql developer version
remove the '^' on link and paste to url
2. Install standalone server
3. enable log in sql authentication
4. Download JBDC Driver
remove the '^' on link bellow and past to url
6. enable tcp ip port for sql server
7. import jar file to project library in java compiler
6. Input code for connection in main
String hostname = "localhost";
String sqlInstanceName = " "; //computer name
String sqlDatabase = " "; //sql server database name
String sqlUser = "sa";
String sqlPassword = " "; //passwrod sa account

//jdbc:sqlserver://localhost:1433;instance=COMPUTERBERRY;databaseName=Database;
String connectURL = "jdbc:sqlserver://" + hostname + ":1433"
+ ";instance=" + sqlInstanceName + ";databaseName=" + sqlDatabase
+";encrypt=true;trustServerCertificate=true";

7. If you still get error from port just change the enable settings each IP

Credits to ComputerBerry for my basis.
Рекомендации по теме
join shbcf.ru