Error accessing sql server

  • Thread starter Thread starter Nicholas Paldino [.NET/C# MVP]
  • Start date Start date
N

Nicholas Paldino [.NET/C# MVP]

Ricardo,

Do you have the SQL server set up so that the ASPNET user on the local
machine can access it? Since it is on the local machine, network access
shouldn't be a problem.

Hope this helps.
 
Ricardo,

Offhand it looks to me that you do not have not given the user
'CORE-XP\ASPNET' rights to login on your local server. Once you have checked
that make sure that you have given that user access to the database 'varired'.

I hope this helps
---------------------
 
I'm getting the following eror when I try to connect to msde in my local
machine:

System.Data.SqlClient.SqlException: Login failed for user 'CORE-XP\ASPNET'.

my connection string is:

SqlConnection cnn = new SqlConnection(";Integrated
Security=SSPI;database=varired;server=(local);");

SqlCommand cmm = new SqlCommand("Select * from Clientes",cnn);

cnn.Open();


Any ideas???

thx...
 
Ricardo,

You can do this using osql. First open a command prompt and type in osql -U
<username>. Once you are logged in you can grant the user access to the
database just type in sp_grantlogin <username> then GO. After the user has
access to the database you can grant the user specific permissions to the
tables/stored procedures/views/etc. (e.g. GRANT SELECT ON <tablename> TO
<username>).

I hope this helps.
 
Back
Top