• 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

WSAD 5.1 - JDBC Driver Problem for SQLServer 7.0

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
I am a MS ASP developer and recently moved to J2EE(WebSphere) development. Using the WebSphere IDE tool(WSAD), tried to set up the database connection, to SQLServer 7.0, in the WSAD(WebSphere) 5.1 thru' the data perspective. But it failed with varying error messages such as "connection refused", "connection reset", "problem with com.ibm....".
Tried all the SQLServer JDBC drivers provided by IBM i.e.
1. DataDirect SequeLink 5.1 DRIVER
2. DataDirect SequeLink 5.3 DRIVER
3. WebSphere Connect JDBC DRIVER
Driver 1 and 2 are failing. I am able to connect using thrid driver, but i could NOT see all the tables and its contents i.e. all the primary folders are empty :-(
My understanding is that IBM gives the necessary JDBC drivers for all the popular databases. And hence i do not need additional drivers.
I do not know why the drivers are not working... or... am i making any mistake?
Also I am in need of the code fragment to connect to the sqlserver(7.0) database i.e. things like class.forname, JNDI name, url, getconnection).
Need your help please.
Thanks and regards,
Renuka
 
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Renuka
1. you are using WSAd. So you can configure ur datasource using WSAD from the server perspectivt.
2. You want to use SQL Server with WSAD. That means, you should have a SQL Server Driver installed in your machine if you are using JDBC Driver type 2 or need to directly connect to Database using JDBC Driver type 4.
3. Follow the steps in the redbook to configure JDBC Driver and Datasource in WSAD.
4. Create an alias under Security tab under JAAS.
4. Then in ur code do this following
InitialContext ctx = new InitialContext(); //no need to use properties or anything.
DataSource ds = (DataSource) ctx.lookup("jndiName");
Connection con = ds.getConnection();
....
Hope it will help you.. Dont hesitate to shoot me a reply if you need any help on the same...
-Mahesh
SCEA, IBMC WAS 5.0,4.0,3.5, WSAD4.0,5.0
IBMC UML, IBM ED, IBM DB2 DBA and User,
SCJP, SCWD
Owner of http://www.certificateguide.com
 
Renuka G
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks, Mahesh.
Will get back to you after my try.
Regards,
Renuka
 
Renuka G
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Mahesh,
>>2. You want to use SQL Server with WSAD. That means, you should have a
>>SQL Server Driver installed in your machine if you are using JDBC Driver
>>type 2 or need to directly connect to Database using JDBC Driver type 4.
I believe you are mentioning the JDBC driver. For SQLServer, there is no driver needed from Microsoft - Pls correct me if i am wrong.
>>4. Create an alias under Security tab under JAAS.
Even to view the data from the data perspective, do i need to do this? Please do explain.
Thanks and regards,
Renuka
 
Mahesh Chalil
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No, from Dataperspective you dont need to do this. It should be straightforward to get connection from Dataperspective. Do one thing, look at the documentation under "help"-> Contents
 
Renuka G
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Managed to overcome - had to uncheck the "Exclude System Schema" in the Filetr section of the database connection wizard.
Thanks, Mahesh.
Regards,
Renuka
 
reply
    Bookmark Topic Watch Topic
  • New Topic