Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 189
  • Last Modified:

Best technique to make changes in the database and to maintain up-to-date the code

In my project I have defined a series of DataAdapter that in turn use each one of them a DataSet.

My problem is that I use a connection string that I need to change for code, and when I make a change in the database, or I have to add some field I have to change the connection string manually in the code that VB.NET generates, I also have problems with the numeration of the DataSet, VB.NET changes the numeration to DataSet 1, DataSet2.................

On the other hand the changes have to also reflect them in the procedures stored with what any change becomes a hell for my.

Does some form exist of avoiding this?
Which the best technique is to make changes in the database and to maintain up-to-date the code?

Thank you



0
miguelmam
Asked:
miguelmam
1 Solution
 
Bob LearnedCommented:
Store your connection strings in the app.config file:

Example:

Programming with Stored Procedures in Visual Basic .NET (Part 2):
http://www.codeguru.com/vb/gen/vb_database/storedprocedures/article.php/c5155/

Look in the section 'Externalizing the Connection String'

Also, you can have one DataSet, and multiple data adapters.  That is the beauty of a DataSet.

Bob
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now