Skip to main content

Featured

Game Development Tutorials In Android

Game Development Tutorials In Android Hi Guys,                 We are shortly started Game Development Tutorials in Android Studio. So everyone supports me and share this blogs to your friends. Guys, At this time everyone is freely available to source code and we are provide a video for step by step game developments. you are learn free and feel free to support us. Guys, if you have any question to me, so feel free to comment us. I will try to answer all the question as long as possible.                                                     Thank's                                                                          ...

SQL Server Test In Java Programming Language

SQL Server Test In Java Programming Language

In this Example, we will discuss an important chapter of Java, SQL Server test but Before we can start to make the SQL Server Test Program, click on the Advertisements , available on this page.


//import java.io.*;
import java.sql.*;

public class Sqlservertest{
static private Connection con=null;
static private Statement stmt=null;
static private ResultSet rs=null;


public static void main(String arg[])
{

//String connectionUrl ="jdbc:sqlserver://localhost:1360;"+"databaseName=manvendra; user=sa; password=sa";

try{
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
con=DriverManager.getConnection("jdbc:sqlserver://localhost:1360;"+"databaseName=manvendra;user=sa;password=123456");
stmt=con.createStatement();
String query="select * from address";
rs=stmt.executeQuery(query); 
while(rs.next())
{
System.out.println(rs.getString(1));
System.out.println(rs.getString(2));
System.out.println(rs.getString(3));
//System.out.println(rs.getString(4));
}
}
catch(Exception ex)
{

System.out.println(ex);
}
}

}

Compile And Run On this Program for Better Understandings.

If this information is important to you , and you want to , I will continue writing some more details of Java, Android Programming Language, so click on the advertising, available on this page. This is motivate me for writing some more useful stuff, Thank's 

Comments