文件名称:database
- 所属分类:
- JSP源码/Java
- 资源属性:
- [Java] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 2kb
- 下载次数:
- 0次
- 提 供 者:
- zh***
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
查询数据库首先需要导入数据库对应的JDBC驱动包代码中:需要一个Driver,forname一下 Driver.connect(...连接url,通常里面就指定了远程主机的ip或名称了,不同数据库JDBC的url有不同写法)得到一个Connection 此后...你懂的。~ 补充:UnknownHostException指无法检测到对应的主机,在你机子上做这样的测试: ping 这个host telnet host 端口如果这两个都通过了,一般不会有这个异常了。如果出现类似不允许访问数据库的情况,则要注意给数据库用户添加相应的权限
-Inquires the database first need to import database corresponding JDBC Driver package code: need a Driver, a forname Driver. Connect (... Connection, usually in url specified remote host s IP or name, different database JDBC url have different written) get a Connection after this... You understand. ~ added: UnknownHostException refers to the corresponding host could not be detected, in your machines on do such test: ping the host Telnet host port if the two are passed, general will not have the exception. If appear similar not allowed access to the database of the case, to pay attention to the database users to add the corresponding privileges
-Inquires the database first need to import database corresponding JDBC Driver package code: need a Driver, a forname Driver. Connect (... Connection, usually in url specified remote host s IP or name, different database JDBC url have different written) get a Connection after this... You understand. ~ added: UnknownHostException refers to the corresponding host could not be detected, in your machines on do such test: ping the host Telnet host port if the two are passed, general will not have the exception. If appear similar not allowed access to the database of the case, to pay attention to the database users to add the corresponding privileges
(系统自动生成,下载前可以参看下载内容)
下载文件列表
SearchDemo.class
SearchDemo.java
SearchDemo.java