sql server access denied or does not exist problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • manisha khabrani
    New Member
    • Jun 2007
    • 24

    sql server access denied or does not exist problem

    hey guys plzzzzzzzzzzzzz zzzzzz 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.
  • bharadwaj
    New Member
    • Jun 2007
    • 22

    #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.

    Comment

    • manisha khabrani
      New Member
      • Jun 2007
      • 24

      #3
      Originally posted by bharadwaj
      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.

      Comment

      • bharadwaj
        New Member
        • Jun 2007
        • 22

        #4
        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

        Comment

        • bharadwaj
          New Member
          • Jun 2007
          • 22

          #5
          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
          [code=cpp]
          using System;
          using System.Data.Sql Client;
          using System.Data.Sql Types;

          using SeminarsInfo.Da taAccessor;
          using SeminarsInfo.Ut il;

          namespace SeminarsInfo.Tr ansformer
          {
          /// <summary>
          /// Summary description for SeminarsInfoTra nsformer.
          /// </summary>
          public class SeminarsInfoTra nsformer
          {
          public SeminarsInfoTra nsformer()
          {
          //
          // TODO: Add constructor logic here
          //
          }

          public DBProcess dbProcess = null;
          public stringSQLString =
          string.Empty;

          public void DBconnection()
          {
          dbProcess = new DBProcess();
          try
          {
          --for connecting the following code will work

          dbProcess.Creat eConnection(tes t.server, test.database, test.usr, test.pwd);
          }
          catch(System.Da ta.SqlClient.Sq lException sqlExp)
          {
          throw sqlExp;
          }
          }


          public void CreateDataReade r(string SQLString)
          {
          dbProcess.selec tDataInReader(S QLString);

          }

          //public void FetchSemInfo()
          //{
          //dbProcess = new DBProcess();
          //try
          //{

          //dbProcess.Creat eConnection(tes t.server, test.database, test.usr, test.pwd);
          //}
          //catch(System.Da ta.SqlClient.Sq lException sqlExp)
          //{
          //throw sqlExp;
          //}
          //
          //SQLString=
          "SELECT * FROM table";
          //dbProcess.selec tDataInReader(S QLString);
          //}
          }
          }[/code]

          Comment

          • Infide
            New Member
            • Jul 2007
            • 28

            #6
            Originally posted by manisha khabrani
            hey guys plzzzzzzzzzzzzz zzzzzz 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.

            Comment

            Working...