Category Archives: Java未入门

Microsoft JDBC “ResultSet Can Not Re-Read Row Data” Error

A:使用MS SQL Server 2000 SP3a/SP4做数据库服务器时,用Microsoft提供的JDBC驱动(2.2.0040),在查询时遇到一个SQLException:java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]ResultSet can not re-read row data for column #。查询语句和JDBC代码都没有问题,怀疑是Microsoft驱动的BUG,google一下果然在Microsoft support站点发现了问题:http://support.microsoft.com/kb/824106,原因是如果该表存在TEXT, NTEXT, IMAGE等大型字段,对于ResultSet的字段读取必须按照从左向右读,如果你用:int a = rs.getInt(2);int b = rs.getInt(1);则报错。Microsoft给出的方案是不能从右往左也不能连续读2次。没办法自己改代码,严格从左向右读,结果就没有问题了。

Posted in Java未入门 | 1 Comment

Jbuilder2006安装后第二次启动失败

 正常安装,然后运行,一切正常 关闭 再启动 只出现了启动画面 然后就什么也没有了。  用Google一搜 jbuilder2006 启动 得到如下提示:   start > run > cmd.exe > cd <jb2006>\bin > jbuilder.exe or JBuilder.exe -verbose 看exception  然后编辑/bin下的jbuilder.config文件,原来  vmmemmax设置的值为75%,我将其改为128m就可以了,如果你的内存空间够大,还可以再设置大些,比如256m  相关文章: http://www.cjsdn.net/post/view?bid=7&id=159125    我的机器内存是1.5G,可能出在这儿了:  我修改jbuilder.config: vmmemmin 128mvmmemmax 512mvmparam -XX:MaxPermSize=512m

Posted in Java未入门 | 4 Comments

今天编译java的遇到的问题

java未入门 Continue reading

Posted in Java未入门 | Leave a comment

java 批处理运行

@echo offset CP=D:\Java\JRun4\lib\jrun.jar;%CLASSPATH%set cmd=java -classpath “%CP%” %*echo %cmd%%cmd%set CP=

Posted in Java未入门 | 2 Comments

昨天,去听李维的课,关于JBuildX的ALM

  李维把JBuildX的ALM(软件应用周期解决方案) http://www.borland.com.cn/events/Java_Seminar2004_Reg.html  

Posted in Java未入门 | Leave a comment

一个 The Formatter Class in J2SE 1.5 例子

/* * Created on 2004-6-1 * * To change the template for this generated file go to * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments *//** * @author pal * * To change the template for this generated type comment go to * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments */ /** *  * 在Delphi中用习惯 Format() 函数, … Continue reading

Posted in Java未入门 | Leave a comment

The Formatter Class in J2SE 1.5

文章来源:  http://www.developer.com/java/other/article.php/3327721 The Formatter Class in J2SE 1.5By Jeff Langr Java 1.5 introduces a new class named java.util.Formatter that allows you to do string formatting similar to the printf function in C. It depends heavily on the varargs feature being … Continue reading

Posted in Java未入门 | Leave a comment