Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2006-01-04 : 08:23:38
|
| vidya writes "Hi this is vidyakumar i am working as a trainee programmer.I am using WinXP-Pro While working @ home on Asp.net with sql server-2000 as back end i am getting this runtime errorSQL Server does not exist or access denied. every thing is correct even my server is runningI quaried this command SELECT @@SERVERNAME ans :- HAPPYHOM-576F99and i traied a lot but the problem still persists please help mehere i am sending my codeSqlDataReader dr; // Page index is assumed to be 0-based int nPageSize = gridworksetup.PageSize; int nBaseProductID = nPageSize * nPageIndex; // Set up the connection string connectionString = "server=@HAPPYHOM-576F99;database=employeedetails;integrated security=true;uid=sa;pwd="; con = new SqlConnection(connectionString); // Set up the command string SQLSelect; SQLSelect = "SELECT * FROM Worksetup_details "; SqlCommand cmd =new SqlCommand(SQLSelect,con); // Execute the command con.Open(); dr = cmd.ExecuteReader(CommandBehavior.CloseConnection); return dr; }This is the error i am getting:---SQL Server does not exist or access denied. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: SQL Server does not exist or access denied.Source Error: Line 65: Line 66: // Execute the commandLine 67: con.Open();Line 68: dr = cmd.ExecuteReader(CommandBehavior.CloseConnection);Line 69: return dr; Source File: d:\inetpub\wwwroot\employee\worksetup.aspx.cs Line: 67 Stack Trace: [SqlException: SQL Server does not exist or access denied.] System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction) System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction) System.Data.SqlClient.SqlConnection.Open() Employee.Worksetup1.CreateDataSource(Int32 nPageIndex) in d:\inetpub\wwwroot\employee\worksetup.aspx.cs:67 Employee.Worksetup1.Worksetup() in d:\inetpub\wwwroot\employee\worksetup.aspx.cs:43 Employee.Worksetup1.Page_Load(Object sender, EventArgs e) in d:\inetpub\wwwroot\employee\worksetup.aspx.cs:36 System.Web.UI.Control.OnLoad(EventArgs e) System.Web.UI.Control.LoadRecursive() System.Web.UI.Page.ProcessRequestMain()Please help me regarding thisthank you " |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-01-04 : 08:26:33
|
| Check the connection Stringwww.ConnectionStrings.comMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|