Skip to content

How To Connect to Database after Deployment

JLGelsomino

Asked Mar 18, 2006, 1:05 PM EST1 answer
Share
LinkedInX
I need to know how I would setup my program so that after I make it a .exe and install it on another computer, it give me the option to connect to a database on a server? Can someone guide me to a sample or a link as to how to do this.

Thank You
WackoWolf

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • Jayadev Nair
    0
    Yes, you can change the db connection of our app after deployment. There are several ways for this. You can read connection string from Windows Registry, a configuration file (yourApp.exe.config) which is the app.config on your VB.NET solution explorer. Which backend are you using? You can even change the type of Backend if you use Microsoft Enterprise Library which is available to download at http://msdn.microsoft.com/library/?url=/library/en-us/dnpag2/html/EntLib2.asp . Please note, this is for .net 2.0. If your using prior version, Microsoft have versions for 1.1 available at their site. Instead, Using the Configuration file to store is what i'm recormmending. You can find the help on MSDN itself. You can just determine and change the connectionstring at runtime even without changing your application code.

    cheers.
    0