I am creating Cucumber Project with JTDS which is like JDBC. No current row in the ResultSet

I want to use the one row from resultset as input to another query.

I was trying to print the only one row from the resultset and I am unable to do it.

The code I am using is

System.out.println(arg2);

ResultSetMetaData rsmd1 = rs1.getMetaData();

String Couluumn = rsmd1.getColumnName(1);

System.out.println(Couluumn);

int Count = rsmd1.getColumnCount();

System.out.println(Count);

String Output1 = rs1.getString(arg2);

System.out.println(Output1);

while (rs1.next()){

for (int i = 1; i <= Count ; i++){

String Output = rs1.getString(arg2);

System.out.println(Output + " ");

}System.out.println("");

}

System.out.println("Select * from "+ arg1+" where "+ arg2 + " in (");

throw new PendingException();

}

and output I am getting at console

Appl_No

Appl_No

200...

Read More »

By: StackOverFlow - Wednesday, 14 March

Related Posts