473,549 Members | 2,573 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

way to avoid re-configuring all adapters in a project after adding field to table?

It seems whenever I add a new field to a database table that's queried
by DataAdapters in my project, I get run-time errors because I don't
go back and re-generate all the DataAdapters to read the new field.

When I first generate the DataAdapter using the wizard, the list of
fields in the database table gets hard-coded into the SelectCommand:

SELECT ID, username, password_hash, email_address, datetime_create d
FROM wbuser

and if I use that adapter to auto-generate a typed DataSet, that list
of fields will be entered into the typed DataSet as well as the
"wbuser" DataTable object. The problem occurs when I add another
field to a database table, and then on some other WebForm I create a
new DataAdapter for the "wbuser" table, and use it to re-generate the
"wbuser" DataTable in the typed DataSet. Now, that wbuser DataTable
in the typed DataSet is incompatible with all the old adapters that
used the old list of fields. If the newly added field in the table
doesn't allow nulls, for example, then if I try to use the old adapter
to fill the new DataTable, I'll get a run-time error, presumably
because it doesn't know what to put in the missing field.

So is there some magic way to make all the DataAdapters re-configure
themselves at once when I add a new field to a table?

-Bennett
Nov 18 '05 #1
0 1218

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

Similar topics

4
1992
by: James Henson | last post by:
I'm using a MySQL database from within some Perl and PHP cgi's. To make the connection, I have to supply the username/password in the connection string. This info is readable for anyone that can view my code, e.g. all other users that can access the webserver box directly. This because the cgi-program has to be readable for the user that's...
0
1097
by: Erick | last post by:
Hi, Does any one know how to avoid to register of the event log source by the TransactedInstaller object? I have a service which have some code into the main method to self-register base on the paramenter. Im using the TransactedInstaller class to do this. In order to know the output from the installation I call the installation as this...
3
2081
by: serge calderara | last post by:
Dear all, I have a vb.net application which start with a sub main procedure. inside this sub main procedure I create a and instance from an assembly x like as follow: sub main() ..... Application.Run(New frmLogin) end sub
1
1252
by: Corobori | last post by:
Hi, I need to provide a way to download a software and its corresponding manual from a web page. So far I have done the sign in page where people give their data. I will then give access to a page with a link allowing to download the required file(s). My worry is how to avoid that somebody grabs the URL of the file and
30
3529
by: seesaw | last post by:
Is it right thing to always avoid using "new" to create objects? What if after starting the application, then decide which and how many objects to create? (Seems like under such situation is there no other choice but using "new")
32
3084
by: KK | last post by:
Hello all, I have a unsigned char buffer 'buffer' and I need to convert the first 12 bytes of it into a string. Below is a code that should work, however, how can I avoid reinterpret_cast operator? Or Is there a simple way to get around this? Thanks. -KK /* not tested yet */ typedef unsigned char BYTE std::string...
5
2247
by: Kevin | last post by:
Hi! Is there anyway to avoid flicking between pages navigation in Asp.Net 2.0, like smartnavigation atribute in asp.net 1.1? Thanks and Regards.
4
2107
by: DC | last post by:
Hi, the subject says it all. Since visible=false controls will still run though Page_Load, I was hoping that the MultiView would somehow manage to avoid a Page_Load of controls in its inactive Views. But of course it does not. I guess a safe way to avoid Page_Load is to only add the controls at runtime into the activated view. Which of...
11
53083
Niheel
by: Niheel | last post by:
http://bytes.com/images/howtos/information_overloaded.jpgPaul Graham wrote an interesting article a few months back about how the internet is leading to information overload for information workers of today. He is not alone in his thinking. Similarly, In July of 2008 IBM, Intel, Microsoft and Xerox announced that they were joining forces with...
6
2486
mageswar005
by: mageswar005 | last post by:
Hello Guys, I want to Avoid the Save option when i click the download link in php . I just want open and cancel option only, i dont want save option when i click the download link in php.How to avoid the save option bec for file security reason. Detail Description: Language i used : PHP Db i used : Mysql ...
0
7459
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7726
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7967
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7485
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6052
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5097
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3505
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1953
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
772
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.