ZhiningZhang

Greenhorn
+ Follow
since Jun 13, 2001
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by ZhiningZhang


Ken's note is excellent! Thanks, Ken!!!
If the note has references to spec, it would be better. linke,
1.1 doGet, ==> SRV.2.1.1

Ken's note is really helpful!
-Zhining
hello, all,
i was wondering if there is UML document for servlet and jsp api?
i think it would help me to study and memorize api.
thanks!
-Zhining
hello, all,
what does it mean by "distributable" in web.xml?
thanks!
-Zhining
yes, it works!
Thanks, jlrober!!!
-Zhining Zhang
thanks, jlrober!
I am using SQL Server now, but wish my code would work for ORACLE too ( if possible ). So I do not want to use DB's system objects, and want to use jdbc's features.
I am wondering if DatabaseMetaData has this info. How to use it to get constraint's info?
-Zhining Zhang
Hello, All,
How can I get the infomation of relationship/constraints in DB from jdbc? How to add new relationship to DB using jdbc?
Thanks! -Zhining Zhang

how to use FetchSize in ResultSet? Can FetchSize solve my problem ?
Thanks! -Zhining

Hello, All,
Get ResultSet from "select * from mytable". But my talbe is too huge, I got error message (java.lang.OutOfMemoryError <<no stack trace available>>) .
Can I get ResultSet 100 rows each time? Is there any jdbc example for this solution?
" Select top 100 * from mytable " only gives me top 100, how can I get next 100 rows ???
Thanks! -Zhining
hello, all,
i got type "longvarbinary" by using ResultSetMetaData.getColumnTypeName() for Server SQL data type "image". How can I know the origianl type is image???
"ntext" of SQL Server is also "longvarbinary". The mapping relationship is many-to-one. Is it possible jdbc tell me the original data type???
Thanks! -Zhining
Hello, Frank,
Sorry about that! But my real name IS "Zhining Zhang", which is on my dricer license. I used "Zhining Zhang" to register before, but I forgot the password.
-Zhining

hi, i solved my problem.
Connection conn = ...
Statement stmt = conn.createState(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
Statement stmt2 = conn.creatState(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
=======
it works by using only one connection.
Thanks anyway!
-Zhining

I had a topic of "copy table using jdbc". Now I wanted to ask the same question in different way.
I have two connections for two databases on two servers. I got one ResultSet from a table in one connection. Can I use the ResultSet to create exactly the same table ( schema and items ) on another connection???
I think ResultSet has all information to create a table.
Thanks a lot! -Zhining
Hi, all,
My code is like
==============================
Connection conn = ...
Statement stmt = conn.createState();
Statement stmt2 = conn.creatState();
ResultSet rs = stmt.executeQuery("select * from mytable");
while( rs.next() )
{
ResultSet rs2 = stmt2.executeQuery("select * from mytable222"); // error here !!!
}
}
======================
I got Exception
======================
ava.sql.SQLException: [Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt
at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6031)
at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:6188)
at sun.jdbc.odbc.JdbcOdbc.SQLExecDirect(JdbcOdbc.java:2494)
at sun.jdbc.odbc.JdbcOdbcStatement.execute(JdbcOdbcStatement.java:314)
at sun.jdbc.odbc.JdbcOdbcStatement.executeQuery(JdbcOdbcStatement.java:229)
==================================
But if I change my code to
========================
Connection conn = ...
Connection conn2 = ... // new connection
Statement stmt = conn.createState();
Statement stmt2 = conn2.creatState(); // using conn2
========================
it works. My question is that "do I really need another Connectin?" Thanks! -Zhining