今天在研究如何将oracle表字段的信息存到列表数组中,做了一点实验,是在java1.5下,用myeclips做的,代码如下:
public static List<Map<String,String>> gocilist(Connection conn,String table)
{
ResultSet rs = null;
Statement stmt=null;
//Connection conn = null;
String sqlm="select COLUMN_NAME,DATA_TYPE,DATA_LENGTH,DATA_PRECISION,DATA_SCALE,NULLABLE,COLUMN_ID from user_tab_columns where table_name =UPPER('"+table+"')";
List<Map<String,String>> fv1 = new ArrayList<Map<String,String>>();
Map<String,String> fmap = new HashMap<String,String>();
try{
// conn = dbcon.dbconn();
stmt=conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_READ_ONLY);
rs= stmt.executeQuery(sqlm);
while(rs.next()){
fmap = new HashMap<String,String