SQLServerException:'='附近的语法不正确

时间:2015-03-12 04:06:28

标签: java sql-server

这给出了语法错误xD,我也知道它在url中,但实际上并不太明白:

public String usuario="sa";
public String contraseña="hola";

public String url ="jdbc:sqlserver://localhost;databaseName=ALIBABASE;";

public Connection cn=null;
public Statement st=null;


public Statement Conectar()

{
    try
    {
    Connection cn = DriverManager.getConnection( url,usuario,contraseña);
    st=cn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);

    }   catch (SQLException i)
        {
            JOptionPane.showMessageDialog(null, i);

        }
        return st;
    }

}

0 个答案:

没有答案