fail login sql database...
OS : windows server 2003
DB : SQL server 2000
Would you help me?
case1
string conn = "server=localhost; database=Dotnet; uid=sa; pwd=;";
SqlConnection connection = new SqlConnection(conn);
connection.Open();
This case1 is occurred Exception(System.InvalidCastException)
[InvalidCastException: ÃöäÃà ó½ºÃ®°¡ ÃøøµÃ¾ú½Ã´Ã´Ã.]
ASP.control_test_aspx.Setmyname(Object src, EventArgs e) +133
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +33
System.Web.UI.Page.ProcessRequestMain() +1277
case2
string conn = "server=localhost; database=Northwind; uid=sa; pwd=;";
SqlConnection connection = new SqlConnection(conn);
connection.Open();
This case2 is not occurred Exception. Login success.
Q1. I don't understand above state. Why case1 have CastExeption?
case3
string conn = "server=localhost; database=Northwind; uid=Administrator; pwd=star_3327;";
SqlConnection connection = new SqlConnection(conn);
connection.Open();
This case3 can't login sql server(System.Data.SqlClient.SqlException).
[SqlException: 'Administrator' »ç¿ëÃ𡠷ñÃÃÃÃÃÃö ¸øÃýôôÃ.]
System.Data.SqlClient.ConnectionPool.GetConnection (Boolean& isInTransaction) +472
System.Data.SqlClient.SqlConnectionPoolManager.Get PooledConnection(SqlConnectionString options, Boolean& isInTransaction) +372
System.Data.SqlClient.SqlConnection.Open() +384
ASP.control_test_aspx.Setmyname(Object src, EventArgs e) +72
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +33
System.Web.UI.Page.ProcessRequestMain() +1277
Q2. Why case3 can't login?
|