struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From JOEL VOGT <joel.v...@studentmail.newcastle.edu.au>
Subject Newbie datasource Q
Date Wed, 28 Mar 2001 00:41:29 GMT
Hi all,

Hopefully this is an easy question for somebody.
In my struts-config I have the datasource
<data-sources>
  	  <data-source
  	     autoCommit="false"
  	     description="Access data source config"
   	     driverClass="sun.jdbc.odbc.JdbcOdbcDriver"
   	     maxCount="4"
   	     minCount="2"
   	     password="mypassword"
             url="jdbc:odbc:Rec97"
             user="myusername"
             />
</data-sources>

later on in a servlet I have

javax.sql.DataSource dataSource = servlet.findDataSource(null);
con = dataSource.getConnection();

When I try to use this however, I get an java.sql exception :
'no data found'	

Anyone know how to fix this, do this proper? It works fine if I hard 
code in the database details.

Thanks, 
Joel.


Mime
View raw message