www.webdeveloper.com
Results 1 to 2 of 2

Thread: Multiple Database Sources??

  1. #1
    Join Date
    Apr 2011
    Location
    Seattle, WA
    Posts
    265

    Question Multiple Database Sources??

    Ok, so I have a website that I'm making that has read-only access to a different website's database information (to list the names of communities and the lots within them) and I am making a tracker-thingy for the website (the one with read-only access) that involves making their own list of stuff and updating it...

    Basically I need something that can get the community's id and name and the lot id from the other database and then make it's own list of information on the localhost database like the stage of construction, who (which user-id number from the localhost) is doing the electrical, etc.

    Is there a way to connect to two different databases for the same page and then only update the information to one of them?

  2. #2
    Join Date
    Jan 2007
    Location
    Wisconsin
    Posts
    2,120
    Sure. Your server-side language will have some mechanism for establishing a connection. You just do that twice with different variables/handles and connection strings or parameters.


    ADDENDUM: Though, some DBMS's also support a mechanism "linked server" mechanism, wherein you can writing your queries against database A, which has access to remote database B as if it were just another instance on the local machine. In that case, you'd establish a single connection from your page/application and simply refer to the remote database tables using their full, long-form names. I know SQL Server supports this. (Not sure if MySQL does.)
    Last edited by svidgen; 03-08-2012 at 05:18 PM.
    Jon Wire

    thepointless.com | rounded corner generator

    I agree with Apple. Flash is just terrible.

    Use CODE tags!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles