Localhost

M

MW de Jager

Hi

I'm trying to connect to a database on my machine from an ASP.NET
appliaction. The connection string currently contains my machines name on
the LAN in stead of "localhost". If I change the connection string to look
for the database on localhost, I get an error stating that the database does
not exist, or acces denied. The database exists, 'cause it works fine if I
have my machine name in the connection string. Why is access denied and how
do I fix it?

Any help appreciated

MW
 
G

Guest

hi,
if you are trying to access the db on the local machine then the connection
string can be something like this
Integrated Security=SSPI;Persist Security Info=False;User ID=;pwd=;Initial
Catalog=YourDB;Data Source=(local)
note that datasource is (local) instead of localhost which uses the db on
your machine. i am considering windows authentication for the db here.
 

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

Top