File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Websphere and the fly likes Am I doing anything wrong while setting up SQLServerDataSource..... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Websphere
Bookmark "Am I doing anything wrong while setting up SQLServerDataSource....." Watch "Am I doing anything wrong while setting up SQLServerDataSource....." New topic
Author

Am I doing anything wrong while setting up SQLServerDataSource.....

nilesh bhattad
Greenhorn

Joined: Jan 15, 2003
Posts: 8
Dear Friends,
I'm trying to setup a MSSQL DataSource in WSAD. I have following settings in server-cfg.xml
URL Prefix : jdbc:microsoft:sqlserver://MFXE2KSQL01V:4141;DatabaseName=RiskAppetite;selectMethod=cursor
Implementation class name : com.microsoft.jdbcx.sqlserver.SQLServerDataSource
And the JAVA code is..
Context ctx = (Context) new InitialContext();
DataSource ds = (DataSource) ctx.lookup("jdbc/RiskAppetite");
Connection con = ds.getConnection("RiskAppetiteAppId", "RiskAppetiteAppId");
I'm able to get a DataSource handle from JNDI. While trying to get a connection, I get a following exception
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]JTA is not support when selectMethod=direct. Switch to selectMethod=cursor.
at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source)
at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
at com.microsoft.jdbcx.sqlserver.SQLServerDataSource.getXAConnection(Unknown Source)
at com.ibm.ejs.cm.pool.JTAConnectionFactory.createConnection(JTAConnectionFactory.java:40)
at com.ibm.ejs.cm.pool.ConnectionPool.createConnection(ConnectionPool.java:932)
at com.ibm.ejs.cm.pool.ConnectionPool.createOrWaitForConnection(ConnectionPool.java:860)

As you can see in my URL Prefix, I specified "selectMethod=cursor" But for some reason, I'm still getting the above error. Please let me know if anyone has a solution on this.
Thanks in advance !!
Regards
Nilesh
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Am I doing anything wrong while setting up SQLServerDataSource.....
 
Similar Threads
Please help setting up with MSSQL DataSource.
wsad 4.03 selectMethod=????
Error connecting to MSSQL Server from Hibernate
"Could not find stored procedure" Error
Connection Error WSAD to SQL Server