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

Posted on 2005-04-27
Last Modified: 2010-04-23
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

Question by:miguelmam
    1 Comment
    LVL 96

    Accepted Solution

    Store your connection strings in the app.config file:


    Programming with Stored Procedures in Visual Basic .NET (Part 2):

    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.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    I'm currently working for a company where I have to upgrade over 50 VB6 programs to VB.NET 2008.  So far I'm about half way through, and I've learned quite a few tricks that drastically improve the performance of VB.NET apps. Because there are a…
    If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    7 Experts available now in Live!

    Get 1:1 Help Now