the code for jdbc.odbc driver
created on windows 2000 server with the dsn name hide
the code: -
-----------------------------------------------------
import java.sql.*;
import java.util.*;
import java.lang.*;
class ConnectApp {
public static void main(String args[])
{
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection connection =
DriverManager.getConnection("jdbc:odbc:hide", "sa",
"");
DatabaseMetaData meta = connection.getMetaData();
System.out.println("Database:
"+meta.getDatabaseProductName());
System.out.println(" version
"+meta.getDatabaseProductVersion());
System.out.println("User Name:
"+meta.getUserName());
connection.close();
}
catch(Exception ex) {
System.out.println(ex);
System.exit(0);
}
}
}
------------------------------------------------------------------
u can create a odbc driver using the JNI(java native
interface) and use the driver for c++ programs