aspose file tools*
The moose likes JDBC and the fly likes [Microsoft][ODBC Driver Manager] Data source name not found and no default driver spe Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "[Microsoft][ODBC Driver Manager] Data source name not found and no default driver spe" Watch "[Microsoft][ODBC Driver Manager] Data source name not found and no default driver spe" New topic
Author

[Microsoft][ODBC Driver Manager] Data source name not found and no default driver spe

Samuel Jaeson
Greenhorn

Joined: Dec 23, 2004
Posts: 9
Hi
I am Trying to connect SQL Database using JDBC
till yesterday it was working fine today
i installed some java based ide like netbeans and eclipse
then it started giving this error
net beans which i used used to take port 8084 but my Apache port is set to 8080 port and many a time changes made in the servlets did not reflect
probably it used to pick up prevously runned servlet
now i have uninstalled all the ide but still its giving me the same error
i have created ODBC Driver and its working fine
i dont know may be there is some conflict with config setting or my code is wrong
kindly guide me
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
here is my code
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con = DriverManager.getConnection("jdbc dbc nlineBankingSQL","sa","sumitj");
out.println("ConnectionCreated");
Statement stmt = con.createStatement();
rs = stmt.executeQuery("Select Accid, Sum(TAmt*TType) Balance from Trans where AccId= '"+accidparam+"' group by Accid");
rs.next();
Balance = rs.getString("Balance");
}
Damanjit Kaur
Ranch Hand

Joined: Oct 18, 2004
Posts: 346
con = DriverManager.getConnection("jdbc dbc nlineBankingSQL","sa","sumitj");


When you created odbc, Is OnlineBankingSQL same as the dsn name you specified in odbc and also username and password.

The error is relating to odbc dsn not found.
bijoy bose
Ranch Hand

Joined: Mar 27, 2004
Posts: 32
i believe you have to set it up path manually from ODBC data administrator from your control panel..Did you have set it up like this already??
 
wood burning stoves
 
subject: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver spe