By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,779 Members | 1,111 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,779 IT Pros & Developers. It's quick & easy.

DB2 connectivity

P: 24
Hi
i am new to DB2 and i am working on a java application on windows ,backend for this is DB2,

i am trying to access the db2 server which is on Mainframes from the java application on Windows...,i don't have db2 client installed on windows..

the jdbc driver used for the connectivity is jdbc type 4 .

at present i am using the following connection string in the application:

"jdbc:db2://Hostname:portnumber/DatabaseName","UID","PWD"

i think i am able to cnnect to the DB2 database
using the following condition i am checking the same:

if(conn!=null) then
System.out.prinltn("Connection successful");

where conn Connection object

after this i have tried to access the a table in the database (User has access to all the tables in the database)
String query = "select * from schema.emp");
resultSet = st1.executeQuery(query);

i am getting the folowing error while accessing the table:
com.ibm.db2.jcc.c.SqlException: DB2 SQL error: SQLCODE: -551, SQLSTATE: null, SQLERRMC: null

-551 is a privilege error but the User has access to all the tables in the database.
let me know the solution to this if any of u knows or let me know if any other inforamtion or clarification needed from my side...


Thanks in Advance
Sujatha N
Jul 30 '07 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.