i use this code for connection string
Connection con;
con=DriverManager.getConection("jdbc:odbc:dsname","username","password");
i use this code to conect the database in my local system,
my doubt is how can i connect the msaccess database which is in server, program also uploaded into the website server, that server is a non window platform, there how can we create the DSN name. Or any other methods
to connect the database, i use the access database, if it is a sql or any others no problem to conect,
All to gether different process. Java provides four types of driver(Type I - Type IV) for it. When u r creating DSN name and all for Type I driver.
We can not create DSN name for other types of driver. can you please go through the type of driver. After that, look at below code.
String databaseDriver = "org.gjt.mm.mysql.Driver";
Class.forName( databaseDriver );
String databaseName = "jdbc:mysql://localhost/test";
Connection con = null;
try{
con = DriverManager.getConnection(databaseName, "name","password");
String query = "select * from cust where id =2";
Statement st = con.createStatement();
ResultSet rs = st.executeQuery(query);
///////extra coding