Change of catalog
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Sreekumar_Chathambil
Posted On:   Wednesday, March 17, 2004 04:26 AM

public class cons_1 { Connection con; Statement stmt; ResultSet rs, rs1; DatabaseMetaData dbmd; public void test(){ try{ Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); con = DriverManager.getConnection("Jdbc:Odbc:batch","aji","aji"); stmt = con.createStatement(); dbmd = con.getMetaData(); rs1 = dbmd.getCatalogs(); con.setCatalog("ajinomoto"); System.out.println("Default : " + con.getCatalog()); } catch(ClassNotFoundException e){ } catch(SQLException e){ e.printStackTrace(); } } public static void main(String[] a   More>>

public class cons_1 {
Connection con;
Statement stmt;
ResultSet rs, rs1;

DatabaseMetaData dbmd;


public void test(){
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con = DriverManager.getConnection("Jdbc:Odbc:batch","aji","aji");
stmt = con.createStatement();
dbmd = con.getMetaData();
rs1 = dbmd.getCatalogs();
con.setCatalog("ajinomoto");
System.out.println("Default : " + con.getCatalog());


}
catch(ClassNotFoundException e){

}
catch(SQLException e){
e.printStackTrace();
}
}
public static void main(String[] args) {
cons_1 a= new cons_1();
a.test();

}
}

iam getting an error for setCatalog Method. Please help me..

   <<Less

Re: Change of catalog

Posted By:   Simon_Ablett  
Posted On:   Wednesday, March 17, 2004 06:00 AM

And the error is?
About | Sitemap | Contact