1 21 22 package org.apache.derbyTesting.functionTests.util; 23 24 import java.sql.Connection ; 25 import java.sql.DriverManager ; 26 import java.sql.ResultSet ; 27 import java.sql.SQLException ; 28 import java.sql.DatabaseMetaData ; 29 30 public class metadataHelperProcs { 31 32 33 public static ResultSet rs; 34 35 public static void getBestRowId(String schema, String tableName, int scope, String nullable, ResultSet [] rs) throws SQLException 37 { 38 Connection conn = DriverManager.getConnection("jdbc:default:connection"); 39 boolean tf = true; 40 if (nullable.equals("false")) 41 tf = false; 42 rs[0] = conn.getMetaData().getBestRowIdentifier(null,schema.trim(),tableName.trim(),scope,tf); 43 } 44 45 } 46 | Popular Tags |