Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Meaning of 'database URL'

0 views
Skip to first unread message

Ql8a

unread,
Sep 2, 1998, 3:00:00 AM9/2/98
to
I am trying to create a connection to a remote database on the internet, and am wondering if I can specify the datasource as a URL.

In the JDK documentation, the 'java.sql.DriverManager.getConnection(string, url)' method is described as follows:

getConnection

public static Connection getConnection(String url,
                                       Properties info) throws SQLException

     Attempt to establish a connection to the given database URL. The DriverManager attempts to select an appropriate driver from the set of registered JDBC
     drivers.
     Parameters:
          url - a database url of the form jdbc:subprotocol:subname
          info - a list of arbitrary string tag/value pairs as connection arguments; normally at least a "user" and "password" property should be included
     Returns:
          a Connection to the URL
     Throws:
          SQLException - if a database-access error occurs.

where  url - a database url of the form jdbc:subprotocol:subname;

can I specify an internet URL, say (using the JDBC/ODBC Bridge) :-

jdbc:odbc:http://+host+/+odbcDataSourceName+

eg.   jdbc:odbc:http://www.blofeld.com/contactDB

?
Or, if not, how can make a connection to a datasource that isn't on my local machine?

regards

don

Pierre-Yves Gibello

unread,
Sep 3, 1998, 3:00:00 AM9/3/98
to
Ql8a wrote:
>
> can I specify an internet URL, say (using the JDBC/ODBC Bridge) :-
>
> jdbc:odbc:http://+host+/+odbcDataSourceName+
>
> eg. jdbc:odbc:http://www.blofeld.com/contactDB
>

No! A JDBC URL has nothing to see with http.

> Or, if not, how can make a connection to a datasource that isn't on my
> local machine?
>

You need a client/server JDBC Driver: such a driver will allow to
specify a host name or address in order to connect, of course.

The JDBC/ODBC bridge is not client/server: it allows to connect a DB on
the local host.

If you need a cheap solution, we've got a freeware JDBC Driver (RmiJdbc,
at http://dyade.inrialpes.fr/mediation/download) that can make the
JDBC/ODBC bridge client-server.

If you need high performance, buy a commercial driver dedicated to the
database you are using.

Regards,
Pierre-Yves Gibello :)

Michael Chen

unread,
Sep 3, 1998, 3:00:00 AM9/3/98
to
The Connection URL is driver specific. You cannot dream up the way you wanted.
Each driver has its own syntax. You just have to learn it from the driver's manual.

JDBC-ODBC bridge is not capable of accessing a remote data source over the
internet. <- that is a period! <- that is an exclamation mark

You need a Type-3 driver like IDS JDBC Driver (with a middle server) to do that.
A type-4 driver usually offers remote db access as well.

Thank you

Michael Chen
IDS Software -- Home of IDS Server
The best Type-3 JDBC driver solution.
http://www.idssoftware.com/
----------

Ql8a wrote in message <35ED50A1...@easynet.co.uk>...


I am trying to create a connection to a remote database on the internet, and am
wondering if I can specify the datasource as a URL.

can I specify an internet URL, say (using the JDBC/ODBC Bridge) :-

jdbc:odbc:http://+host+/+odbcDataSourceName+

?


Or, if not, how can make a connection to a datasource that isn't on my local machine?

regards

don


0 new messages