将NetBeans 8.0.2连接到Microsoft SQL Server Management Studio [英] Connecting NetBeans 8.0.2 to Microsoft SQL Server Management Studio

查看:237
本文介绍了将NetBeans 8.0.2连接到Microsoft SQL Server Management Studio的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为一个类在NetBeans中开发一个应用程序,并且需要GUI能够与我在Microsoft SQL Server Management Studio中创建的数据库进行通信. GUI需要能够获取用户信息并将其导入数据库.它还需要能够从数据库中检索信息以进行查看和编辑.我以前从未使用过数据库,但是能够自学基础知识.我在查找如何将GUI连接到我的数据库时遇到了麻烦.有没有简单的方法可以将两者连接起来?我不介意学习自我,实际上这是更好的选择,但是任何链接或建议都将不胜感激.

I am working on an app in NetBeans for a class and need the GUI to be able to communicate to a database that I created in Microsoft SQL Server Management Studio. The GUI need to be able to take user information and import it to the database. It also needs to be able to retrieve information from the database for review and editing purposes. I have never used the database before, but was able to teach myself the basics. I am having trouble finding out how to connect the GUI to my database though. Is there an easy way to connect the two? I don't mind learning myself, in fact that would be preferable, but any links or suggestions would be very much appreciated.

推荐答案

这里有一个用于连接到MySQL数据库的教程:

There is a tutorial here for connecting to a MySQL database:

https://netbeans.org/kb/docs/ide/mysql.html

几乎所有内容都与Microsoft相同,只是您将需要其他JDBC驱动程序.您可能要先练习MySQL,因为它是免费的. MySQL驱动程序随Netbeans一起提供,但Microsoft驱动程序将需要单独下载.我相信您可以了解以下内容,但我还没有尝试过.

Almost everything will be the same with Microsoft, except you will need a different JDBC driver. You might want to practice with MySQL first since it is free. The MySQL driver comes with Netbeans but the Microsoft Driver will need to be downloaded separately. I believe you can get at the following, but I haven't tried it.

https://msdn.microsoft.com/en-us/sqlserver/aa937724.aspx

通过转到服务"选项卡,将驱动程序添加到Netbeans,右键单击数据库"->新建连接",然后在对话框中单击添加"按钮.

You add drivers to Netbeans by going to the Services Tab, Right-click on Databases -> New Connection and click the Add button in the dialog.

您还需要将驱动程序添加到每个项目库中.

You will also need to add the driver to each projects libraries.

一般的JDBC教程在这里:

The general JDBC tutorial is here:

https://docs.oracle.com/javase/tutorial/jdbc/

涵盖了数据库之间的通用接口.

which covers the common interface between databases.

这不是必需的,但是在Gui和数据库之间进行bean绑定非常有用,或者更容易.

It is not necessary but it can be useful and or easier to do beans binding between Gui and database.

请参阅本教程:

https://netbeans.org/kb/docs/java/gui- binding.html

这篇关于将NetBeans 8.0.2连接到Microsoft SQL Server Management Studio的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆