Jim:
When you are connecting to a remote DB2 , I am assuming you have cataloged
the remote db2 on the machine where you will run your jdbc code. That being
true you URL would look like
jdbc:db2:dbalias
When using app driver you need to specify the database alias. You can also
use the net driver in which case you do not need to catalog the remote
database and your URL would look as follows:
jdbc:db2://localhost:6789/dbname
but you driver would be:
"COM.ibm.db2.jdbc.net.DB2Driver"
Thanks,
Manas.
----- Original Message -----
From: "Jim Ehrlich" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, April 18, 2001 9:40 AM
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:
> 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