Results 1 to 3 of 3

Thread: Multiple Database Query

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2006
    Posts
    243

    Multiple Database Query

    Hi,
    I've to fetch data from Multiple database from the same server to new table. I'm using MS Access and VB 6. Actually we've 4 packages running on same server with different locations and we have to show all the employees from all database (all have same table structure). Can anyone Help.?

  2. #2
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    Re: Multiple Database Query

    To populate a table from another table in another Access database then you can try something like this.
    Code:
    Dim cnn As ADODB.Connection
    Set cnn = New ADODB.Connection
    cnn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.3.51;Data Source=c:\db1.mdb;Persist Security Info=False;"
    cnn.Open
    cnn.Execute "INSERT INTO Tablex IN 'c:\db2.mdb' SELECT FROM Tablex;"
    cnn.Close
    Set cnn = Nothing
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  3. #3
    PowerPoster
    Join Date
    Nov 2002
    Location
    Manila
    Posts
    7,629

    Re: Multiple Database Query

    You might want to consider consolidating access databases to a single database for a long term solution... application rewrite will be expensive later on when you need to consolidate data and time could have been spent on other tasks (investment wasted) .
    Last edited by leinad31; Nov 17th, 2009 at 03:34 AM.

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