package leaveword;
import java.sql.*;
import java.text.SimpleDateFormat;
import java.util.Date;
public class jdbc
{
public jdbc()
{
}
Connection con = null;
String re = "";
String servanddb = "jdbc:microsoft:sqlserver://localhost:1433;DatabaseName = Test_DB";
String user = "bn";
String pass = "bn";
public Connection getCon()
{
try
{
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver").
newInstance();
con = DriverManager.getConnection(servanddb;user,pass); //这句有错,是没有加ms sql driver的缘故吗?请问
//在jbuilder2006中怎么加msbase.jar、mssqlserver.jar、
} //msutil.jar
catch(Exception e)
{
e.printStackTrace();
}
return this.con;
}
error :')' expected at line 24 (24:56)
not a statement at line 24 (24:57)
';' expected at line 24 (24:61)