Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Question on how to use two identical databases.

Question on how to use two identical databases.

Scheduled Pinned Locked Moved Visual Basic
databasetutorialquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Anonymous
    wrote on last edited by
    #1

    I want to use 2 identical databases(with different data). I use a database component. I want to know how I can change the connection's path (change form 1 database to the other) so that I don't need to change all the adapters' connections.:eek:

    L 1 Reply Last reply
    0
    • A Anonymous

      I want to use 2 identical databases(with different data). I use a database component. I want to know how I can change the connection's path (change form 1 database to the other) so that I don't need to change all the adapters' connections.:eek:

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      DB.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + DBPath + ";Mode=ReadWrite|Share Deny None;Persist Security Info=False" DB.RecordSource = SQL_QUERY DB.Refresh I'm using an ADO control to hook up to my DB, but I presume its quite similar with a DAO DB. Notice DBPath is a variable used to supply the path to the DB you want to switch to.

      L 1 Reply Last reply
      0
      • L Lost User

        DB.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + DBPath + ";Mode=ReadWrite|Share Deny None;Persist Security Info=False" DB.RecordSource = SQL_QUERY DB.Refresh I'm using an ADO control to hook up to my DB, but I presume its quite similar with a DAO DB. Notice DBPath is a variable used to supply the path to the DB you want to switch to.

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        that smiley face has bloody appeared, NOTE it should be "Share Deny None; Persist...". ;P Alan.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups