Localhost

  • Thread starter Thread starter MW de Jager
  • Start date Start date
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
 
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.
 
Back
Top