Hi all,
        I am using freetds driver for sql server.I am testing this driver
using some standalone java file.
       But I am getting the problem with prepare statement.
       When we call  "getResultSet()" method on prepare statement, the
system is just hangs up.
        It is not excuting the other statements below that statement.

        Can any body tell me what is wrong with it?

The code i have wriiten is

public static void main(String arg[]) throws Exception
 {

 Class.forName("com.internetcds.jdbc.tds.Driver");
 System.out.println("After class for Name");
 Connection
con=DriverManager.getConnection("jdbc:freetds:sqlserver://172.16.16.251:1433
/EChequeBank;TDS=7.0","bank","bank");
 System.out.println("After getting connection");
 PreparedStatement ps  = con.prepareStatement("Select * from AdminTable");
 System.out.println("After getting Statement");
 ps.executeQuery();
 System.out.println("After Executing");
 ResultSet rs=ps.getResultSet();
 System.out.println("After getting Result set");
 while(rs.next())
 {

  System.out.println("AdminID is"+rs.getString(1));
  System.out.println("Password is"+rs.getString(2));
 }


Thanks In Advance
Rama Rao


_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to