Lap Lap - 3 months ago 7x
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.


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; }