SQL Server does not exist or access denied message

  • 14 years ago

    Can anyone help please?

    I am getting the following error message:

    SQL Server does not exist or access denied.

    My connection string used to work and I could connect to my sql database.

    However I have since run some automatic updates and now I get the above message.

    Is this down to iis or ie settings?

    My connection string is as follows

    string

    con="data source=localhost;integrated security=SSPI;Persist Security Info=True;initial catalog=Northwind";

    SqlConnection sqcon=

    new SqlConnection(con);

    string command="Select name from sysdatabases";

    SqlDataAdapter sda=

    new SqlDataAdapter(command,sqcon);

    sda.SelectCommand=

    new SqlCommand();

    sda.SelectCommand.CommandText=command;

    sda.SelectCommand.Connection=sqcon;

    DataSet firstdataset=

    new DataSet();

    sda.Fill(firstdataset,"Datab");

     

Post a reply

No one has replied yet! Why not be the first?

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“To iterate is human, to recurse divine” - L. Peter Deutsch