Ganymede에서 업데이트하는 중에 EMF, GEF 설치 중에 자꾸 문제를 일으킨다.

eclipse.stu.edu.tw 라는 곳이 문제인데, 업데이트 할 플러그인을 다운로드 받다가 서 버린다.

Update할 mirror 를 내 마음대로 설정하는 법을 찾아봐도 못 찾겠어서 그냥 그 사이트에 접속 자체를 못하게 해서 문제를 피해간다.

Windows XP Pro  c:\winnt\system32\drivers\etc\hosts 파일을 편집했다.
hosts파일에 추가한 내용: 127.0.0.1 eclipse.stu.edu.tw
이제는 업데이트가 잘 된다... :)

Ubuntu의 경우 /etc/hosts 파일에다 위 내용을 추가하면 된다.

Posted by zennken
출처: http://java.sun.com/products/jdbc/reference/faqs/index.html

4. How do I start debugging problems related to the JDBC API?

A good way to find out what JDBC calls are doing is to enable JDBC tracing. The JDBC trace contains a detailed listing of the activity occurring in the system that is related to JDBC operations.

If you use the DriverManager facility to establish your database connection, you use the DriverManager.setLogWriter method to enable tracing of JDBC operations.

If you use a DataSource object to get a connection, you use the DataSource.setLogWriter method to enable tracing. (For pooled connections, you use the ConnectionPoolDataSource.setLogWriter method, and for connections that can participate in distributed transactions, you use the XADataSource.setLogWriter method.)

Posted by zennken

JDBC Row Count

Development/Java 2008. 11. 28. 10:45

출처: http://java.sun.com/products/jdbc/reference/faqs/index.html

18. There is a method getColumnCount in the JDBC API. Is there a similar method to find the number of rows in a result set?

No, but it is easy to find the number of rows. If you are using a scrollable result set, rs, you can call the methods rs.last and then rs.getRow to find out how many rows rs has. If the result is not scrollable, you can either count the rows by iterating through the result set or get the number of rows by submitting a query with a COUNT column in the SELECT clause.

Posted by zennken

zennken

달력