File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes JDBC:DB2 getConnection syntax Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "JDBC:DB2 getConnection syntax" Watch "JDBC:DB2 getConnection syntax" New topic
Author

JDBC:DB2 getConnection syntax

Michel Calzada
Greenhorn

Joined: Jan 16, 2002
Posts: 2
hi everybody
we have a problem trying to connect whith a OS390 DB2 database.
We used the COM.ibm.db2.jdbc.net.DB2Driver for DB2 (OS390 ver 5.2 )
String url = "jdbc:Db2://192.29.3.56:446/locationName=DBS1;collectionId=default;packageName=JDBCPKG";
we used :
DriverManager.getConnection(url, user, pass)
and an exception was thrown with the SQL Message :
08S01 : error reciving from socket
we supose there is an error in our url after the
"jdbc:Db2://192.29.3.56:446/"
can somebody help us ?
Thanks on advance.
[Edited by Dave to fix the problem]
[ January 21, 2002: Message edited by: David O'Meara ]
Paulo Salgado
Ranch Hand

Joined: Jan 18, 2002
Posts: 98
Hello Michel,
are you tryng to connect from a DB2 client PC or directly from a Java application in the UNIX System Services file system ?
Michel Calzada
Greenhorn

Joined: Jan 16, 2002
Posts: 2
Hello Paulo,
We are using a java aplicacion in a PC with Windows NT
Paulo Salgado
Ranch Hand

Joined: Jan 18, 2002
Posts: 98
Hello Michel,
I've been working on the UNIX System Services so I never tried what you're doing. But I browsed the docs for UDB V5 and found out that the driver your are using is for Applets. The driver for applications is COM.ibm.db2.jdbc.app.DB2Driver. This was found in the chapter 15 of the Embedded SQL Programming Guide manual. Other than that, if your client has the Server configured already, you could try the url jdbc b2 BS1.
You can find the docs online at http://www-4.ibm.com/cgi-bin/db2www/data/db2/udb/winos2unix/support/v5pubs.d2w/en_main
Regards.
Paulo
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: JDBC:DB2 getConnection syntax
 
Similar Threads
Java DB2 Type 4 connection problem
HELP 2 !!!!!!!!!
EJB transaction
Db2 driver and Distributed transaction
Where is JDBC driver for DB2 on OS390??