469,275 Members | 1,568 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,275 developers. It's quick & easy.

sql server access denied or does not exist problem

hey guys plzzzzzzzzzzzzzzzzzzz help me. i am trying to do a simple program on C SHARP databases using sql server but i ma getting an exception , it requires open and available connection, sql server does not exist whereas the sql server icon on my task bar says that status is Running. plzzzzzzzzzzzz help.
Jul 11 '07 #1
5 1568
Access is denied will come for the following situations.

1.Due to network failure.
2. Bcos of authentication and the password while registering the instance of sql server.
3.Add the instance in client network utility.

hope this will help u.
Jul 11 '07 #2
Access is denied will come for the following situations.

1.Due to network failure.
2. Bcos of authentication and the password while registering the instance of sql server.
3.Add the instance in client network utility.

hope this will help u.

hey firstly thanks for yr response. you were too technical , i mean i still don't know how to go about the problem as to what needs to be donce actually. i am new to sql server tooo.
Jul 11 '07 #3
open enterprise manager,in that goto-->>
console root-->sql server group-->instance name(urs database instance).
let me know can u able to open instance
Jul 11 '07 #4
i dont no abt Csharp.
but i found the following code in google.hope this will help u.in this code i have commented the code contains how check the connectivity
Expand|Select|Wrap|Line Numbers
  1. using System;
  2. using System.Data.SqlClient;
  3. using System.Data.SqlTypes;
  4.  
  5. using SeminarsInfo.DataAccessor;
  6. using SeminarsInfo.Util;
  7.  
  8. namespace SeminarsInfo.Transformer
  9. {
  10. /// <summary>
  11. /// Summary description for SeminarsInfoTransformer.
  12. /// </summary>
  13. public class SeminarsInfoTransformer
  14. {
  15. public SeminarsInfoTransformer()
  16. {
  17. //
  18. // TODO: Add constructor logic here
  19. //
  20. }
  21.  
  22. public DBProcess dbProcess = null;
  23. public stringSQLString=
  24. string.Empty;
  25.  
  26. public void DBconnection()
  27. {
  28. dbProcess = new DBProcess();
  29. try
  30. {
  31. --for connecting the following code will work
  32.  
  33. dbProcess.CreateConnection(test.server, test.database, test.usr, test.pwd);
  34. }
  35. catch(System.Data.SqlClient.SqlException sqlExp)
  36. {
  37. throw sqlExp;
  38. }
  39. }
  40.  
  41.  
  42. public void CreateDataReader(string SQLString)
  43. {
  44. dbProcess.selectDataInReader(SQLString);
  45.  
  46. }
  47.  
  48. //public void FetchSemInfo()
  49. //{
  50. //dbProcess = new DBProcess();
  51. //try
  52. //{
  53.  
  54. //dbProcess.CreateConnection(test.server, test.database, test.usr, test.pwd);
  55. //}
  56. //catch(System.Data.SqlClient.SqlException sqlExp)
  57. //{
  58. //throw sqlExp;
  59. //}
  60. //
  61. //SQLString=
  62. "SELECT * FROM table";
  63. //dbProcess.selectDataInReader(SQLString);
  64. //}
  65. }
  66. }
Jul 11 '07 #5
Infide
28
hey guys plzzzzzzzzzzzzzzzzzzz help me. i am trying to do a simple program on C SHARP databases using sql server but i ma getting an exception , it requires open and available connection, sql server does not exist whereas the sql server icon on my task bar says that status is Running. plzzzzzzzzzzzz help.
This is a common permissions problem.
Make sure the account you are using is added to the sql database and has the appropriate permissions. Regardless of whether you are using windows authentication or a sql account you must add the user to the database and set the permissions.

If you are still having issues please post your connection string and tell us what kind of security you have.
Jul 11 '07 #6

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

2 posts views Thread by Chris Stewart | last post: by
2 posts views Thread by george r smith | last post: by
3 posts views Thread by Olivogt | last post: by
9 posts views Thread by Steven Ung | last post: by
5 posts views Thread by D Godwin | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.