This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Websphere and the fly likes Connection Error WSAD to SQL Server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Products » Websphere
Bookmark "Connection Error WSAD to SQL Server" Watch "Connection Error WSAD to SQL Server" New topic
Author

Connection Error WSAD to SQL Server

Guy Barden
Greenhorn

Joined: Jan 09, 2003
Posts: 5
Hi,
I am using the UTE in WSAD to test an EJB that I am developing. I have set up the Data Source information in the Server Configuration, using the com.microsoft.jdbcx.sqlserver.SQLServerDataSource driver class and defined a JNDI name for the datasource.
When I attempt to connect to the DB in EJB code with
InitialContext ic = new InitialContext();
DataSource ds = (DataSource)ds.lookup(jndiName);
Connection con = ds.getConnection();
I get an exception, and the following JDBC error
com.ibm.ejs.container.CreateFailureException: javax.ejb.EJBException: Unable to connect to database. [Microsoft][SQLServer 2000 Driver for JDBC]JTA is not support when selectMethod=direct. Switch to selectMethod=cursor.;
My question is, how do I set the JDBC connection property 'selectMethod' within the WSAD Server DataSource configuration. Or is this something I need to set within java code prior to obtaining a connection?
Thanks in advance
Guy
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Connection Error WSAD to SQL Server