unable to run this code and cant figure out why???
please help.new to
JDBC
code compiles correctly but doesnt run properly
databsase structure
id ->number
name--> varchar
pwd -->varchar
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection c = DriverManager.getConnection("jdbc:odbc:stud");
s = c.createStatement();
int b;
ResultSet rs=s.executeQuery("select * from abc");
ResultSetMetaData rsm=rs.getMetaData();
int col=rsm.getColumnCount();
while(rs.next())
{
for(b=1;b<=col;b++);
{
ta.append(rs.getString(b).trim()+ "\t\t");
}
ta.append("\n");}
}
catch(Exception d)
{
d.printStackTrace();
}
}