how to select database

heyI want to write application that able to select database based on the user login into the system. How do I acomplish this
[138 byte] By [sarasahga] at [2007-10-2 11:35:47]
# 1

I have send a code for your earlier Query, use that code and modify it. That code establishes a connection with the database, Provide a if condition to check whether the username and password is authenticated and then use the code:

stmt = con.createStatement();

rset = stmt.executeQuery ("SELECT * FROM Employee"); // Employee refers to table name

while (rset.next())

{

// get results

String client_no = rset.getString(1);

System.out.println("Name is "+client_no);

}

Regards,

Venkatesh

venkateshpa at 2007-7-13 5:06:46 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...