I'm running JRun on IIS 4.0...
I'm getting the following exception:
"Error verifying store existence. [Class: com.cafepress.bizobj.Stores,
Method:Exists] [Microsoft][ODBC Driver Manager] Data source name not found
and no default driver specified "
when hitting SQL Server thru a class called by a JSP.
The code is as follows:
public class StoreManager {
public static boolean exists(String storeId) throws Exception{
try{
Class.forName(ConnectionPool.DRIVER_NAME);
Connection connection =
DriverManager.getConnection(ConnectionPool.DB_URL,
ConnectionPool.LOGIN_NAME,
ConnectionPool.PASSWORD);
Statement stmt = connection.createStatement();
String sql = "SELECT COUNT(*) FROM STORE WHERE UPPER(STORE_ID) =
UPPER('" + storeId + "')";
ResultSet rs = stmt.executeQuery(sql);
rs.next();
return (rs.getInt(1) != 0);
}
catch(Exception e){
throw new BaseException(e, "Error verifying store existence.",
"com.cafepress.bizobj.Stores", "Exists");
}
}
}
This code works fine from just a regular Java project, but when being called
from a JSP it gives me the error. Any ideas?
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html