如何在NetBeans中连接到derby数据库?

时间:2023-01-17 17:00:53

I have created a project with a derby database on other computer and sent it to myself. Now I can't connect to the database.

我在其他计算机上创建了一个derby数据库的项目,并将它发送给我自己。现在我无法连接到数据库。

2 个解决方案

#1


2  

The Derby documentation contains an excellent set of tutorials to help you get started:

Derby文档包含一组优秀的教程,可以帮助您入门:

http://db.apache.org/derby/docs/10.9/getstart/

#2


0  

Assuming you are using java Code to Connect to the Database from your programme using Net beans tool and Java.

假设您正在使用java代码使用Net beans工具和java从您的程序连接到数据库。

Kindly Check

请检查

1.Make sure your User Name and Password are Connect .

1。确保您的用户名和密码是连接的。

2.Ping the DB port from command Line from the other system from where you are connecting the Database.If you are not able to connect/Ping the DB it means either your port is not open or not responding.

2。从正在连接数据库的另一个系统的命令行Ping DB端口。如果您无法连接/Ping DB,这意味着您的端口没有打开或没有响应。

3.You can also manually connect to the Derby database from the Net beans tool by following the below Link.

3所示。您还可以通过以下链接从netbeans工具手动连接到Derby数据库。

Use Below Link

使用下面的链接

https://netbeans.org/kb/docs/ide/java-db.html

https://netbeans.org/kb/docs/ide/java-db.html

Check Connection String of the Code

检查代码的连接字符串

Class.forName("org.apache.derby.jdbc.ClientDriver");
String myDb = "jdbc:derby://localhost:1527/HWtrial";
Connection DBconn = DriverManager.getConnection(myDb, "","");

#1


2  

The Derby documentation contains an excellent set of tutorials to help you get started:

Derby文档包含一组优秀的教程,可以帮助您入门:

http://db.apache.org/derby/docs/10.9/getstart/

#2


0  

Assuming you are using java Code to Connect to the Database from your programme using Net beans tool and Java.

假设您正在使用java代码使用Net beans工具和java从您的程序连接到数据库。

Kindly Check

请检查

1.Make sure your User Name and Password are Connect .

1。确保您的用户名和密码是连接的。

2.Ping the DB port from command Line from the other system from where you are connecting the Database.If you are not able to connect/Ping the DB it means either your port is not open or not responding.

2。从正在连接数据库的另一个系统的命令行Ping DB端口。如果您无法连接/Ping DB,这意味着您的端口没有打开或没有响应。

3.You can also manually connect to the Derby database from the Net beans tool by following the below Link.

3所示。您还可以通过以下链接从netbeans工具手动连接到Derby数据库。

Use Below Link

使用下面的链接

https://netbeans.org/kb/docs/ide/java-db.html

https://netbeans.org/kb/docs/ide/java-db.html

Check Connection String of the Code

检查代码的连接字符串

Class.forName("org.apache.derby.jdbc.ClientDriver");
String myDb = "jdbc:derby://localhost:1527/HWtrial";
Connection DBconn = DriverManager.getConnection(myDb, "","");