Jim,
Try using :
driver = "COM.ibm.db2.jdbc.net.DB2Driver"; // --------> This is the 'net'
driver, not the 'app' driver.
URL = "jdbc:db2://localhost:50000/DEVEL1";
Alternative :
On NT, there is the Client Configuration Assistant. Using that, configure a
connection to the remote database using TCP/IP, specifying host name, port
number, database name. Once configured, test the connection. If it works OK,
then you can use the "app" driver in your application and specify the URL
as: "jdbs:db2:<remote-database-name>".
HTH,
Abhijit
-----Original Message-----
From: Jim Ehrlich [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 18, 2001 9:41 AM
To: [EMAIL PROTECTED]
Subject: DB2EUG: jdbc URL
I'm using jdbc to connect to UDB 6.1 on NT and Linux. I can connect from
my local NT machine to the devel copy of DB2 using the driver and URL:
driver = "COM.ibm.db2.jdbc.app.DB2Driver";
URL = "jdbc:db2:DEVEL1";
Now to connect to a remote DB2, I should just change the URL, right?
Testing locally, this does NOT work (everything else same as above):
driver = "COM.ibm.db2.jdbc.app.DB2Driver";
URL = "jdbc:db2:localhost:50000/DEVEL1";
Variants like using an IP number or name instead of "localhost" don't work
either. The error message:
Unable to connect to the database: jdbc:db2:localhost:50000/DEVEL1
COM.ibm.db2.jdbc.app.DB2Exception: [IBM][CLI Driver] SQL1001N
"LOCALHOST:50000/DEVEL1" is not a valid database name. SQLSTATE=2E000
Can any of you point me in the right direction? Maybe my port is wrong (I
used
what is shown in Control Center -> Setup Communications).
Thanks,
Jim
----------------------------------
Jim Ehrlich, D.V.M.
DairySight
[EMAIL PROTECTED]
http://www.dairysight.com
=================================
=====
To unsubscribe, send 'unsubscribe' to [EMAIL PROTECTED]
For other info (and scripts), see http://people.mn.mediaone.net/scottrmcleod
=====
To unsubscribe, send 'unsubscribe' to [EMAIL PROTECTED]
For other info (and scripts), see http://people.mn.mediaone.net/scottrmcleod