我查询出了某个数据库的所有表名,然后再根据表名再查询出表名所包含的信息,显示在后台。
就是从那个然后后面的我不知道怎么做了,还有如果有空值,该怎么替换!import javax.swing.*;
import java.awt.*;
import java.sql.*;
import java.awt.event.*;public class Select
{
PreparedStatement stat;
static ResultSet result;
static Connection con;
         String tabName;
public Select() 
{
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con = DriverManager.getConnection
                           ("jdbc:odbc:MyDataSource","sa","");
}
catch(Exception e)
{
System.out.println("Could not execute the query! "+e);
}
}

public void SelectAllTable()
{
try
{
stat = con.prepareStatement("select name from sysobjects where xtype='U'and name!='dtproperties'");
                  result = stat.executeQuery();
    
while(result.next())
{
tabName = result.getString("name");     
System.out.println(tabName);
}
}

catch(Exception e)
{
System.out.println("Could not execute the query! "+e);
}
}

public static void main(String []arg)
{
Select obj = new Select();
obj.SelectAllTable();
}
}