Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.databases.oracle    |    Overblown overpriced overengineered SHIT    |    2,288 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 1,985 of 2,288    |
|    Thomas Hansen to All    |
|    Getting MetaData for JDBC tables with ge    |
|    26 Jan 05 23:06:15    |
   
   XPost: comp.databases.oracle.misc, comp.databases.ibm-db2   
   From: thans2000@gmx.de   
      
   When I access an Oracle database I can successfully select rows from a database   
   table. So at least one table must exist. But when I try to   
   access the MetaData with getTables() I get no data. Why?   
      
   I use the follwoing coding:   
      
    String dbname = "MYDB.TABLEA";   
    DatabaseMetaData md = cn.getMetaData();   
    ResultSet rsm = md.getTables(null, null, dbname, null);   
    if (rsm.next()) {   
    res = true;   
    System.out.println("tables found"); }   
    else   
    System.out.println("tables not found");   
      
   For what are the 4 parameters of getTables? I found some samples with   
   percentage signs as values. Others filled the last paramter and left the third   
   parameter to null. From my point of view putting null into parm 1 and 2   
   should return ALL tables for all users. Is this correct?   
      
      
   Thomas   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca