This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JDBC and the fly likes Driver is not supporting to retrive primary key Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Driver is not supporting to retrive primary key" Watch "Driver is not supporting to retrive primary key" New topic

Driver is not supporting to retrive primary key

prakash narkodu

Joined: May 23, 2003
Posts: 5
i use odbc jdbc driver in my project to retrive database from sql server as well as access. I sucessfully retrived database tables but not retriving primary key. it shows error "driver not supported this funciton".So jdbc dbc driver supported these function if it is not then which driver I can use.
folling is the function that I am using in my program.

public Vector gettingPrimaryKey(String strDbUrl1,String strDbName1, String strLogin,String strPwd,String strTable)
String s;
String strUsr2;
Vector vecPkCol=new Vector();
if(strDataBaseType.equalsIgnoreCase("Oracle 8i"))
String strUsr1=strLogin;
strUsr2= strUsr1.toUpperCase();
s = strDbName1;
String t = null;
String u = null;
String[] vt = {"TABLE"};
Connection con = DriverManager.getConnection (strDbUrl1,strLogin, strPwd);
Statement stmt1=con.createStatement();
DatabaseMetaData db = con.getMetaData();
ResultSet rs = db.getTables(s,t,u,vt);
ResultSet rsPrimaryKey = db.getPrimaryKeys(s, null, strTable);
while (
String strPkColName=strTable+"."+strPkColumnName;
} catch(Exception se)
return vecPkCol;
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: Driver is not supporting to retrive primary key
Similar Threads
need help regarding property file
Not able to execute after sucessfull compilation
problem in bmp deployment
Downloaded file contains garbage value
Interbase - java.lang.verifyError