473,385 Members | 1,337 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

DataSet Designer reflect Database changed schema

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.

"<DataAdaptersMethodcould not be previewed.

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

Thanks

Oct 18 '07 #1
3 2568
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
"Dave Anson" wrote:
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.

"<DataAdaptersMethodcould not be previewed.

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

Thanks

Oct 18 '07 #2
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==?=
<Hu**********@discussions.microsoft.comwrote in
news:4E**********************************@microsof t.com:
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
"Dave Anson" wrote:
>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.

"<DataAdaptersMethodcould not be previewed.

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

Thanks

Oct 18 '07 #3
On 18 Oct, 17:50, Husam Al-A''araj
<HusamAlAa...@discussions.microsoft.comwrote:
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

"Dave Anson" wrote:
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.
"<DataAdaptersMethodcould not be previewed.
Cannot open database <PreviousDatabaseNamerequested by the login.
The login failed. Login Failed for user <me>"
Thanks- Hide quoted text -

- 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.
Oct 19 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: drg | last post by:
I have a DataSet with a DateTime field. I am using an EventRow r, to update it with values from a TextBox in a DataGrid. Suppose a DataGrid in edit mode had a field with value: 7/7/2005. Then the...
3
by: Michelle Stone | last post by:
Hi all I recently changed the schema of a dataset (added one field, and changed another field type from STRING to DATE). I want this reflected in my Crystal Reports Designer. Please don't...
3
by: Michelle Stone | last post by:
Thanks for your message I tried again and again... but didn't work. Can u please detail the exact steps to perform? This is what I do. In field explorer, i right-click the dataset to update....
2
by: SMG | last post by:
Hi there, I have a dataset in memory, which is filled with 1000 records. If the records are changed in the database, I want to reflect the changes to the previous records that means: Dataset...
2
by: Gary Shell | last post by:
I have jumped in to the deep end of the pool, trying out visual inheritance of a form and have run into a snag. I have the need to create a simple maintenance form for five identically...
12
by: chreo | last post by:
I GIVE UP...I can't refresh datagrid (dataset) I have datagrid = dgrPaczki Datasource of that datagrid = DataSetPaczki1.PACZKI_PAKOWALNIA (forgive me Polish words) Dataadapter which fills my...
4
by: Robert Bravery | last post by:
Hi All, I'm New to VS.net. Trying to figure out this new dataset thingy. Ok so I add a dataadapter with all the correct properties for a table. Then generate the dataset. Now open the dataset and...
0
by: Liming | last post by:
Hi, I designed a few DataSet Tables in the typed dataset dsigner. Recently, I encountered an error saying Failed to enable constraints. One or more rows contain values violating non-null,...
8
by: Harry Strybos | last post by:
Visual Studio 2005 - SP1 - VB.Net on WinXP SP2 I add a typed dataset to my solution and get the following errors : Error 1 sub 'ReadXmlSerializable' cannot be declared 'Overrides' because it...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.