Does anyone could me resolve this:
I need to access AS400 to read rows from a physical file,
we assumae the file is in Library : Michael
i code as below:
import com.ibm.as400.access.*;
import java.sql.*;
public class TestJT400{
public static void main(String aa[]){
DriverManager. registerDriver
(new AS400JDBCDriver());
Connection c =
DriverManager. getConnection
("jdbc:as400://SysName",
"UserID", "Password");
Statement s = c.createStatement();
ResultSet rs = s.executeQuery
("SELECT * FROM Michael / PhysicalFileName");
c.close();
}
}
It should not be a hard work but exception occurs and the output exception description is chaos. Could anyone give a enlightened indication, (Many thanks for you if you could response me with a brief code for this case!!!)
About AS400, how can we access physical file by JDBC?
I can't really help you without a stack trace. Even if it seems chaos to you, it will certainly give information which are essential to solve the problem.
The piece of code you showed is correct, so I can't give you a better one.
I think you have some class-path problems since 9 problems out of 10 in java are about class-path, but again without the stack trace I cannot say.
Then there can be problems on the as400 side. Post the stack trace.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment