Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / ADO.NET / January 2006

Tip: Looking for answers? Try searching our database.

Error saving typed dataset (.NET 2.0) - Object not set to referenc

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
tgb - 26 Jan 2006 18:44 GMT
I have an ASP.NET project with a typed dataset (with table adapters).  The
table adapters' connection string property was set to get the connection
strings out of the web.config file.  I was able to add new table adapters,
and all worked well for a while.

Now I need to add another table adapter and cannot do it.  When I try to add
a new one, the connection strings from the web.config file no longer show up
in the wizard's connection string dropdown.  Also, all of the existing table
adapters' connection string properties say "Unable to find connection
'dbname' for object 'web.config'.  The connection string could not be found
in application settings, or the data provider associated with the connection
string could not be loaded.  Oddly enough, if I run the project, the existing
table adapters have no problem connecting to the database.

Since I couldn't add a new table adapter, I figured I'd try it the
old-fashioned way and just add a DataTable and update it in the code (I've
had to work around many bugs in VS2005, so I'm used to it).  However, when I
try to add a DataTable and click "Save", I get an "Object not set to a
reference of an object." messagebox.

When I click on "View Code" for the dataset, I get a couple more "Object not
set..." message boxes, then the schema loads.  Then I notice there are over
100 warnings aobut attributes not being declared.

I can delete the entire dataset and rebuild it from scratch, and it will
work fine for a little while.  After a few days though, it gets back to this
error.  Any ideas?
tgb - 26 Jan 2006 20:57 GMT
Never mind, I was able to re-establish the connection strings in the
web.config file.  I just removed the ones that were already there.  Then I
drug another select stored procedure from the same database into the dataset
from the Server Explorer.  It re-created the connection string in the
web.config file.  Now all my table adapters are working correctly.

Strange that it created the exact same connection strings that were not
working before.  Will see if I have to keep doing this.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.