Web Service Authentication Error with SQL Server

J

jgeisler

Hi,

I'm building my first web service, and I'm having trouble getting into
my local database with the following connectionstring:

Dim myConnection As New SqlConnection("Persist Security Info" & _
"=False;Data Source=Green15;Initial
Catalog=Green15\ZipCode;" & _
"Integrated Security=True;")

The error that I receive is the following:

System.Data.SqlClient.SqlException: Cannot open database
"Green15\ZipCode" requested by the login. The login failed.
Login failed for user 'GREEN15\jgeisler'.

That is the login that I use to connect to that server from SQL Server
Management Studio, and I've definitely added the user
'GREEN15\jgeisler' to the list of SQL Server Users, but still get this
error.

Any help would be appreciated...

John
 
R

Reece

I can duplicate the same error message if I put the SQL Server instance and
a slash in front of my target database in the Initial Catalog setting in the
connection string. Therefore perhaps set your

Initial Catalog=ZipCode;

and see what happens.

Reece
 

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