aspose file tools*
The moose likes Websphere and the fly likes Issue Connecting to MS SQl Server using WAS Embedded Connect JDBC Driver Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Websphere
Bookmark "Issue Connecting to MS SQl Server using WAS Embedded Connect JDBC Driver" Watch "Issue Connecting to MS SQl Server using WAS Embedded Connect JDBC Driver" New topic
Author

Issue Connecting to MS SQl Server using WAS Embedded Connect JDBC Driver

Rajesh MadhanGopal
Ranch Hand

Joined: Jan 19, 2006
Posts: 69
Hi,

We are trying to establish Database (DB Server -> MS SQL Server)connections from our application which runs in WAS 6.0.2.17

I now use WAS Embedded ConnectJDBC driver.

Driver name i use: com.ibm.websphere.sqlserver.SQlServerDriver

Connection URL: jdbc:ibm:sqlserver://servername ort;SelectMethod=cursor;User=userid;Password=pwd;DatabaseName=dbname;

We use both Datasource and Driver manager for connection, all the Datasources when tested work fine but when we connect using Driver manager through the application it throws the following error:

java.sql.SQLException: [IBM][SQLServer JDBC Driver]This driver is locked for use with embedded applications.

Also, when i Test the Driver Manager Connection using the Wizard (Database Explorer) in RAD, all connections through the driver manager work fine.

I can see that this a known issue, but am unable to find a solution to the same.

Any pointers would be of great help.


Thanks<br />Rajesh
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
My advice would be to just convert your code so that it always uses a Data Source. DriverManager just isn't made for use in a managed environment like WebSphere.


Merrill
Consultant, Sima Solutions
Rajesh MadhanGopal
Ranch Hand

Joined: Jan 19, 2006
Posts: 69
hi all,

Tried to convert the code to use Datasource...but am not able to do a JNDI Lookup from my Custom Service in my application.

it Throws a naming exception...tried many settings..but doesnt work...

is it that a JNDI lookup cannot be performed from a Custom Service in WAS?

Please throw some light on this..i seem to be lost on this..
 
 
subject: Issue Connecting to MS SQl Server using WAS Embedded Connect JDBC Driver