• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Connection Error WSAD to SQL Server

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic