Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2004
    Location
    Brussels
    Posts
    5

    Question Unanswered: SQL server does not exist or access denied?

    Hi,

    I recently installed VS .net 2003 and SQL server 2000 on my portable pc, which is not connected to a LAN, but has a direct connection to the internet.

    I am currently working on an asp .net applications that connects to a database on my local sql server.

    The applications works fine as long as I'm connected to the internet. But when I disconnect my network cable and want to run the application, I get the following error:

    "SQL server does not exist or access denied"

    The strange thing is that both the asp.net application and the sql server are running on my local machine...

    Can anyone help me?

    Thanks in advance!

  2. #2
    Join Date
    Jan 2003
    Location
    London, England
    Posts
    106
    I would guess that you have an external connectionstring to your database. If you set something like this is the connstring you should (hopefully) be fine:

    "Provider=SQLOLEDB.1;Password=xx;Persist Security Info=True;User ID=xx;Initial Catalog=xx;Data Source=(local)"
    Frettmaestro
    "Real programmers don't document, if it was hard to write it should be hard to understand!"

  3. #3
    Join Date
    Dec 2003
    Posts
    454
    What is OS on your portable PC? Is SQL server or an instance of SQL server running on your PC?

  4. #4
    Join Date
    Jan 2004
    Location
    Brussels
    Posts
    5

    Thumbs up

    Hi Gyuan,

    I am using windows server 2003 with a full install of sql server. But this morning I managed to solve my problem! Frettmaestro's post put me on the right track.

    Apparently I had to leave the data source parameter blank in the connstring to make a 'local connection'.

    Everything works fine when I use the following connstring:

    "data source=.;trusted_connection=true;user ID=xxx;password=xxx;database=xxx"

    Instead of:

    "data source=(local);trusted_connection=true;user ID=xxx;password=xxx;database=xxx"


    Thanks for the replies, I really appreciate it!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •