Results 1 to 2 of 2

Thread: multiple database

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jun 2010
    Posts
    25

    multiple database

    Dear All Experts,

    I am making a window based application in vb.net.

    Now i have work in two sql databases, so i when the window opens it will show two databases..when i select first db then i can work in that particular db only..if select 2nd db then i can work in second db only..how to do that?

    Please guide me.

    Regards,
    AKM

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: multiple database

    You simply need two connections strings: one for each database. Based on the user's choice, you use one connection string or the other. Follow the Database FAQ link in my signature to learn how to use ADO.NET and you'll see where the connection string gets used.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width