Re: Server Does Not Exist or Access Denied error

Tech-Archive recommends: Speed Up your PC by fixing your registry



> Could you let me know if you have encountered the exception immediately or
> after cetain period of time?

This is the first time I have tried to access remote server - ie it has
never worked

>
> If so, I suggest you try to do the following:
>
> 1. Create a new text file on the desktop.
> 2. Rename it to a.udl.
> 3. Double click it to open a Data Link Property window.
> 4. Try to fill in the text boxes to connect to the server. Use Test
> Connection button to test it.
> 5. If it works fine, open this .udl file in the notepad.

Test works OK
..udl file contains
[oledb]
; Everything after this line is an OLE DB initstring
Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial
Catalog=CSA;Data Source=SGB008940

> 6. You will see the connection string here. If you're using a SQL Server
> provider in ADO.NET, remove the provider= part in the connection string
and
> paste the rest part as connection string in your app.

I make my connection string = "Persist Security Info=False;User
ID=sa;Initial Catalog=CSA;Data Source=SGB008940;"

When I run from my application, the connection fails to open with the
message:
Run-time exception thrown : System.Data.SqlClient.SqlException - SQL Server
does not exist or access denied.


.


Quantcast