数据库错误 - 需要升级才能继续“此数据库文件与SQL Sever的当前实例不兼容......”

时间:2017-06-13 21:48:22

标签: c# sql asp.net

我必须在aspx上为学校做一个项目 我必须做数据库登录用户并注册 但当我尝试点击数据库时,它说错误: http://prntscr.com/fjfrbp 我不知道我能做什么?

这是我的registration.aspx.cs代码:

    if (Request.Form["submit"] != null)
{
    string fName = Request.Form["fName"];
    string lName = Request.Form["lName"];
    string Passwod = Request.Form["Passwod"];
    string email = Request.Form["email"];
    string add = Request.Form["add"];

    string RegStatus;

    if ((fName == "") || (lName == "") || (Passwod == "") || (email == "") || (add == ""))
    {
        RegStatus = ("missing data or wrong data");
    }
    else
    {
        string selectQuery = "SELECT * FROM " + "[Users]";
        selectQuery += " WHERE ";
        selectQuery += " email = '" + Request.Form["email"] + "'";

        if (MyAdoHelper.IsExist(selectQuery))
        {
            RegStatus = ("email does not exists");
        }
        else
        {
            string insertQuery = "INSERT INTO [Users] (fName,lName,Passwod, email,add) VALUES ('";
            insertQuery += fName + "', '" + lName +"','" + Passwod + "', '" + email + "','" + add +"')";
            Response.Write(insertQuery);
            MyAdoHelper.DoQuery(insertQuery);
            RegStatus = ("Registeration was successful "); 
        }
    }

    Response.Write(RegStatus);
    Response.End();
}

0 个答案:

没有答案