Package cn.ctgu.edu. AC;
Import java. SQL .*;
Public class test {
/**
* @ Param ARGs
*/
Public static void main (string [] ARGs) {
// todo auto-generated method stub
string url = "JDBC: sqlserver: // localhost: 1433; database = online bookstore management system; integratedsecurity = true; "; // Log On As widows
string SQL =" select * from users ";
connection conn = NULL;
try
{< br> class. forname ("com. microsoft. sqlserver. JDBC. sqlserverdriver ");
conn = drivermanager. getconne Ction (URL);
statement state = conn. createstatement ();
resultset rs1_state.exe cutequery (SQL);
while (RS! = NULL & RS. next ()
{< br> system. out. println (RS. getstring (1) + "" + Rs. getstring (2) + "" + Rs. getstring (3) + "" + Rs. getstring (4) + "" + Rs. getstring (5) + "" + Rs. getstring (6);
}< br> Conn. close ();
}< br> catch (exception e)
{< br> E. printstacktrace ();
}< BR >}