易截截图软件、单文件、免安装、纯绿色、仅160KB

Java数据库包java.sql.*详解(jdk1.6)

1:应用程序不再需要使用 Class.forName() 显式地加载 JDBC 驱动程序。当前使用 Class.forName() 加载 JDBC 驱动程序的现有程序将在不作修改的情况下继续工作。
2:需要注意以下命令:
executeUpdate:是最基础的数据库的更新、插入和删除操作。效率低下。   
executeQuery:是最基础的执行查询语句,同样也是效率低下。   
execute:兼具上面二者的功能但返回一个boolean型变量
executeBatch:n个SQL语句初始化好,一起提交给数据库执行,效率很高!!!建议使用
3:由2可知,插入操作不能由excuteQuery来执行:
String n=request.getParameter("userName");
String sql=" insert into user value( null,' "+n+" ' ) ";
stmt.execute(sql);


相关文档:

Java 时间范围 Util

 import java.util.Date;
public class TimeSpan
{
public final static TimeSpan ZERO = new TimeSpan(0);

private long _totalMilliSeconds = 0;

public TimeSpan(long totalMilliSeconds)
{
_totalMilliSeconds = totalMilliSeconds;
}

public TimeSpan(Date afterDate, Date beforeDat ......

java连接池技术

2009-04-14 15:37
虽然现在用APACHE COMMONS DBCP可以非常方便的建立数据库连接池,
但是像这篇文章把数据库连接池的内部原理写的这么透彻,注视这么完整,
真是非常难得,让开发人员可以更深层次的理解数据库连接池,真是非常感
谢这篇文章的作者。
import java.sql.Connection;
import java.sql.DatabaseMetaData; ......

java 对于文件的操作

 /**
* 把指定的内容写到指定路径的文本文件上
*
* @param path指定路径
* @param context 要写的内容
*/
public static void writeFile(String path, String context) {
// 从控制台输入内容写入文件
try {
FileWriter fw = new FileWriter(path, true);
PrintWriter pw = new Print ......

SQL使用小结

1. 如果你希望使用selcet top语句,并且还要附带where条件,那么条件中的列就得是合适的索引,如聚集索引、复合索引里的主列
 等,同时,where条件里也要尽量避开使用函数,or,判断NULL等会引起全部扫描的语句,不然执行的是全表扫描。
2. 通过设置STATISTICS我们可以查看执行SQL时的执行效率以及相关性能测试 ......

Java source code for calculating E


The Mean Opinion
Score (MOS) test is a well acccepted standard which is defined in the ITU-T
Rec.P.800.
The value of MOS
test is generated by letting large number of listeners to evaluate the quality
of the test sentences. 
The test scores
are averaged to a mean score which range fro ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号