Help coderanch get a
new server
by contributing to the fundraiser
  • 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
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

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

 
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Rajesh MadhanGopal
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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..
 
reply
    Bookmark Topic Watch Topic
  • New Topic