File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Component Certification (SCWCD/OCPJWCD) 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


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
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");
}
Dale Seng
Ranch Hand

Joined: Mar 22, 2004
Posts: 275
You might copy whatever is inside of your Class.forName and put it in your imports. Then it won't compile if you're missing that. But when you mess around with ODBC, you need to define a datasource in Windows. Could that have changed?

--Dale--
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver spe