Jahnavi Janu

Greenhorn
+ Follow
since Apr 10, 2009
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Jahnavi Janu

Hi Sagar,

I mean to say

'Control Panel -->Administrative tools-->Data Sources(ODBC)-->System DSN-->Add -->Microsoft Access Driver(*mdb)-->Finish-->globalcnts(DSN Name)-->select-->mydatabase.mdb-->OK'


MY DSN name is globalcnts and am selecting database from where it is existing.My database name is mydatabase.mdb it exists in D:\Tomcat 5.0\webapps\Visu\mydatabase.mdb.

I am not trying to create new one.I am trying to connect with already existing database.Is there anything wrong in this Sagar..
Hi Sagar,

I configured DSN like 'Control Panel -->Administrative tools-->Data Sources(ODBC)-->System DSN-->Add -->Microsoft Access Driver(*mdb)-->Finish-->DSN Name-->select-->mydatabase.mdb-->OK' . Is there anything wrong in configuring DSN.And I configured in UserDSn once and by googling i came to know that we have to use system DSN so..I kept it in System DSN.Then also its showing same error like above..Plase let me know where i have done the mistake?


Thank You.
Hi Sujay Nadkarni,

As you said i am pasting my code here.

protected Connection getConnection () throws Exception{
try {

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
conn = DriverManager.getConnection("jdbc:odbc:globalcnts");


conn.setAutoCommit (true);

}
catch (SQLException sqle) {
context.log (" Error getting database connection", sqle);
}
return conn;
}

protected void freeConnection (Connection conn) {
try {
if (conn != null) {
conn.commit ();
conn.close ();
}
}
catch (Exception sqle) {
context.log ("Error freeing database connection", sqle);
}
}

I gave my DSN Name as globalcnts..Please redtify my doubt..

Thank You..
Hi Aravind & Ritchie,

What i did all is opening 'Control Panel +Administrative tools+Data Sources(ODBC)+System DSN+ Add + Microsoft Access Driver(*mdb)+Finish+DSN Name'


Then i used this DSN Name in DriverManager.getConnection(DSNName).Then when i run the project the above exception is generated.Is there anything to do with the Classpath in configuring the DSN?

Thank You.

Hi All,

I am trying to connect to the MS Access database.But exception is coming like

java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified.

But i created DSN Name and selected exiesting *.mdb database.


What might be the reason?Please help me to find out the error.

Thank You,

Jahnavi