Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 16th, 2005, 06:22 PM
Registered User
 
Join Date: Nov 2005
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default fail login sql server

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?


 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
fail login sql database... junghyun baek ASP.NET 1.0 and 1.1 Basics 2 November 22nd, 2005 08:20 PM
Login Fail - Access a Crystal Report from . NET rsk Crystal Reports 0 August 17th, 2004 07:29 AM
login fail by user 'sa' in .net framework 1.1 sara_1981 BOOK: Beginning ASP 3.0 3 August 2nd, 2004 07:26 AM
Login fail Err when view report on Report Server dillig BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 1 July 22nd, 2004 05:31 AM
sa login fail...can't find where to fix it pdr1165 BOOK: ASP.NET Website Programming Problem-Design-Solution 3 March 24th, 2004 04:14 PM



All times are GMT -4. The time now is 07:32 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.