DataSet Designer reflect Database changed schema

D

Dave Anson

The DataSet designer in Visual Studio 2005 is still pointing to the
old database.

I have done this before and it worked without a hitch. The problem is
that I have moved the database and solution on to a different
development box from last time i did this. The other database is no
longer accessible and checked the connection string in the appconfig
is correct by pointing to the new location.

The changes are not reflected in the dataset designer. I have found
that when I attempt to preview the data I get the following error.

"<DataAdaptersMethod> could not be previewed.

Cannot open database <PreviousDatabaseName> requested by the login.
The login failed. Login Failed for user <me>"



Thanks
 
G

Guest

Hi,
You use integrated security to connect to the database and when testing
local in VS2005 it will use the currently logged on user running VS2005. Most
likely that is your user account and it has access to the database.

The error message indicates you are trying to logon to the database with
blabla\ASPNET user and that is the user setup to run the application in IIS.
You could either change this to be another user that has access to the
database needed, under directory security in IIS, or give the user
blabla\ASPNET access to the database.


Cheers,
Husam Al-A'araj
www.aaraj.net
 
D

Dave Anson

Sorry I wasn't clear. The issue is that the message displays the name of
the database before I moved (and renamed it). Not the name of the
database in the connectionString in the appConfig file. I can't see
where it gets this string from.

I have also created another database on my new machine which is the same
name as before. The message still appears, which appears to shows that
the connection is trying to access the previous server.

Another thing I noticed is that in the dataset designer code, the
objects are referenced using the previous database name e.g.
"olddatabase.dbo.myStoredProcedure".

I have full access to the database too. I also didn't mention the
solution is a WinForm.

Thanks
Dave

=?Utf-8?B?SHVzYW0gQWwtQScnYXJhag==?=
 
D

Dave Anson

Hi,
You use integrated security to connect to the database and when testing
local in VS2005 it will use the currently logged on user running VS2005. Most
likely that is your user account and it has access to the database.

The error message indicates you are trying to logon to the database with
blabla\ASPNET user and that is the user setup to run the application in IIS.
You could either change this to be another user that has access to the
database needed, under directory security in IIS, or give the user
blabla\ASPNET access to the database.

Cheers,
Husam Al-A'arajwww.aaraj.net










- Show quoted text -

Thanks for the prompt response. Sorry I may have not been clear....

The error message indicates it is attempting to connect to the
previous database. When I moved the database I also renamed it. The
appConfig file is configured correctly using the new database name and
server.

This is also a WinForm app.
 

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