sql Ö´Ðнá¹ûΪʲô×ÜÊÇ·µ»Ø-1 - .NET¼¼Êõ / ASP.NET
//µã»÷µÇ¼°´Å¥½øÐеǼ£¬ÎªÊ²Ã´×ÜÊÇÖ´ÐÐ Response.Write("<script> alert('ÕæµÄ´íÁË£¡')</script>");
protected void Button1_Click(object sender, EventArgs e)
{
SqlConnection con = new SqlConnection("Server=.;database=Best;uid=sa;");
con.Open();
string sql = "select * from Userlogin where username='" + this.TextBox1.Text + "'and Pwd='" + this.TextBox2.Text + "'";
SqlCommand cmd = new SqlCommand(sql, con);
int i = Convert.ToInt32(cmd.ExecuteNonQuery());
con.Close();
if (i > 0)
{
Response.Redirect("Manger.aspx");
}
else if (i==0)
{
Response.Write("<script> alert('Óû§ÃûºÍÃÜÂë´íÎó£¡')</script>");
}
else if(i<0)
{
Response.Write("<script> alert('ÕæµÄ´íÁË£¡')</script>");
}
}
C# code:
string sql = "select * from Userlogin where username='" + this.TextBox1.Text + "'and Pwd='" + this.TextBox2.Text + "'";
Õâ¶Î
Ïà¹ØÎÊ´ð£º
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jas ......
ÎÒÓÐÒ»¸ö±í£¬½á¹¹ÊÇÕâÑù¡£
ת³ö µ¥Î» תÈ뵥λ ±ÊÊý ½ð¶î
date(Ö÷) outid(Ö÷) inid(Ö÷) num amt
2009 1 2 1 500 Ϊ 1 µ¥Î» ÔÚ2009Ä ......
sqlµÄÈí¼þÔÚÄÄÀï¿ÉÒÔϰ¡£¡ÔÚÍøÉÏÕÒÁËÂù¶à¶¼Óò»Á˰¡
Ëæ±ã¸ãÒ»D°æ°É£¬
ѸÀ×µÚÒ»¸ö¾Í¿ÉÒÔÓÃ
2000,2005¶¼ÕâÑù
http://119.147.41.16/down?cid=0698C2D64D7D637D90A6D2482298E6717D4F15CD&t=2&fmt=-1 ......
ÐèÇóÈçÏ£º
ѧԺ academy£¨aid,aname£©
°à¼¶ class£¨cid,cname,aid£©
ѧÉú stu(sid,sname,aid,cid)
סËÞÇø region(rid,rname)
ËÞÉáÂ¥ build(bid,rid,bnote) bnoteÊÇ¡®ÄС¯/¡®Å®¡¯
ËÞÉá dorm(did,rid,bid£¬bedn ......