Database Servers list

Hi,

How to get a list of Database servers in the network using Java program.

[89 byte] By [Praveen_Javaa] at [2007-11-27 10:12:19]
# 1

This is nigh impossible in any language. Get a better assignment.

cotton.ma at 2007-7-28 15:19:31 > top of Java-index,Java Essentials,New To Java...
# 2

Thanks for u'r response.

Is it possible to connect to a database without creating DSN in Java?

Message was edited by:

Praveen_Java

Praveen_Javaa at 2007-7-28 15:19:31 > top of Java-index,Java Essentials,New To Java...
# 3

> Thanks for u'r response.

>

> Is it possible to connect to a database without

> creating DSN in Java?

>

If you are talking about ODBC DSNs then yes you can connect to databases in Java without ODBC DSNs. In fact except for rare cases you don't need ODBC at all.

Rather than playing 20 questions would you mind sharing with us what your actual problem that you are trying to solve is?

cotton.ma at 2007-7-28 15:19:31 > top of Java-index,Java Essentials,New To Java...
# 4

I have created a class named "Table" for my projects in NIIT

I need this class to be able to connect with the specified table using the given user name and password and the database server name that was supplied as a parameter to the constructor of the class. So can you please tell me the code snippet to connect to the database using the given user name, password and the server name.

Praveen_Javaa at 2007-7-28 15:19:31 > top of Java-index,Java Essentials,New To Java...
# 5

> I have created a class named "Table" for my projects

> in NIIT

>

> I need this class to be able to connect with the

> specified table using the given user name and

> password and the database server name that was

> supplied as a parameter to the constructor of the

> class. So can you please tell me the code snippet to

> connect to the database using the given user name,

> password and the server name.

A JDBC tutorial will give you a better idea than a random snippet on a forum, and will answer your next 10 questions or so before you've even thought of them

georgemca at 2007-7-28 15:19:31 > top of Java-index,Java Essentials,New To Java...
# 6

read any introductory JDBC tutorial and the relevant documentation for the JDBC driver required for the database you're going to connect to.

jwentinga at 2007-7-28 15:19:31 > top of Java-index,Java Essentials,New To Java...