ASP.NET Quickstart can't connect to database

M

myleslawrence

I hope this is the correct forum for this because I'm at wits end.
I have a Win 2003 server, SQL server 2000 and the .Net framework sdk
installed.

The ASP.NET VB Quickstart tutorials have web form examples some of which
connect to the database.
They do not work and I get 'server does not exist or access denied' when I
try to run any of the database examples.

If I revert back to asp and write a simple asp program that does an ADODB
connections and select, it works just fine. Anybody help me on this? Is
there an in which these are supposed to be installed?
 
P

Patrick.O.Ige

Are you changing the connection string s to suit your server!!!
Or you are using the same one..
If you are using the same one then you deserve the ERROR!
 
M

myleslawrence

I changed the connect string to suit my server! I Don't deserve the error.
Thanks for the criticism.
 
J

Juan T. Llibre

Hi, Myles.

Do you mean a QuickStart sample connection like this one ?

SqlConnection("server=(local)\NetSDK;database=pubs;Trusted_Connection=yes")

That will work if SQL Server is installed in the same box as ASP.NET.
Is that your case ?

Also, could you post the exact connection string you're using ?

( Replace the username and password, if you're using them,
but leave the server name in )

The answers to these 2 questions would help, too :

1. Are you impersonating the ASP.NET user in web.config ?
2. Which type of authentication is your SQL Server setup for ?
( SQL Server; Integrated Windows; both ? )

We'll be able to help you a bit more if you'll provide that info.
 
P

Patrick.O.Ige

myleslawrence i wasn't critisizing you.
Did Juan advice did the trick.
Patrick
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,817
Latest member
DicWeils

Latest Threads

Top