Lap Lap - 1 year ago 77
SQL Question

Result into my input

I want to pass a query to SQL Server and in that query, i want to pass some data to database.

But the problem is that i want to take input from user as(example just for understanding you):

String Info =;

and pass that input result
into a query.For example

Info = "Jon";

and that input
should be pass to the database through query.

Answer Source

You can do also as:

public String getHostName() {
String hostName = "";
try { addr = InetAddress.getLocalHost();
    hostName = addr.getHostName();
} catch (UnknownHostException ex) {
  System.out.println("Hostname can not be resolved");
return hostName; }
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download