SQL Server Does Not Exist... & ASP.NET/VB.NET 1.1


I have a web app on my local computer and I can't seem to get it to talk with my database. I keep getting that error message in the title of this message.  I have SQL Server 2K running locally. My web app is running locally with IIS 5.

**** Homepage code ************

' Create Instance of Connection and Command Object
        Dim myConnection As SqlConnection = New SqlConnection(ConfigurationSettings.AppSettings("ConnectionString"))
        Dim myConnection2 As String = ConfigurationSettings.AppSettings("ConnectionString")
        Trace.Warn("Connection String: ", myConnection2)

        Dim myCommand As SqlCommand = New SqlCommand("GetHomepageProducts", myConnection)

        ' Mark the Command as a SPROC
        myCommand.CommandType = CommandType.StoredProcedure

        ' Execute the command
        Dim result As SqlDataReader = myCommand.ExecuteReader(CommandBehavior.CloseConnection)

        repFeatureProduct.DataSource = result


**** web.config *****

<add key="ConnectionString" value="server=localhost;uid=cmlawson;pwd=balboa;database=DPX;" />


I've also tried the following string in the web.config file:

<add key="ConnectionString" value="data source=localhost;initial catalog=DPX;integrated security=SSPI;persist security info=False;Trusted_Connection=Yes;"></add>

In my SQL Server Enterprise Manager, under the 'Users' tab of my dB called 'DPX' I have the following users:

NAME                              LOGIN ACCESS                         DATABASE ACCESS
BUILTIN/Administrators     BUILTIN/Administrators         Permit
cmlawson                        cmlawson                            Permit
dbo                                 DELL1/Chad Michael Lawson  Permit
DELL1/ASPNET                 DELL1/ASPNET                     Permit
DELL1/IUSR_DELL1           DELL1/IUSR_DELL1               Permit
Guest                                                                        Via group membership

I've read almost all the posts related to this topic on this site and others but I can't seem to figure out what's going wrong so I'm hoping someone can help me out?

If I'm leaving out any relevant info please ask me and I'll do what I can to give it too you. Keep in mind I'm not a whiz in SQL Server but can get around OK in asp.net.

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

     <add key="ConnectionString" value="server=localhost;database=testdb;User ID=xxx;Password=xxxx" />

Try browsing the database from the VS.net server browser and add the database from there. Then look at the connection property and check the connection string. Also, when installing the DB did you specify an instance name?

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
cmlawsonAuthor Commented:
bsdotnet: tried your suggestion but it didn't work out for me.

meomar: tried that out and worked great. I've never used Visual Studio in that manner and I think it's a great little trick! After I compared the connection string in VS.NET with mine the only difference was my data source was set to 'localhost' and it's was set to 'DELL1'. I don't know why this matters but I'm guessing it's a permission's thing. Anyway, all said and done, I have a new trick in my bag now and I also have my problem solved.

Thanks so much!

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.