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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. two databases.

two databases.

Scheduled Pinned Locked Moved C / C++ / MFC
databasehelptutorial
5 Posts 5 Posters 2 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.
  • T Offline
    T Offline
    tejaswi teja
    wrote on last edited by
    #1

    hi .problem here . canu please tell how to establisth a connection between two databases. my problem is like this. there are two databases ( 2 objecs of Cdatabase class) one is an ms access database and other is excel database. i want to use tables of msaccess in excel database. both are in two different locations ( on the pc). is there any way of importing tables from msaccess database to other one. or any opther kind of a solution please . waiting for ur replyy. tejaswi.

    C 1 Reply Last reply
    0
    • T tejaswi teja

      hi .problem here . canu please tell how to establisth a connection between two databases. my problem is like this. there are two databases ( 2 objecs of Cdatabase class) one is an ms access database and other is excel database. i want to use tables of msaccess in excel database. both are in two different locations ( on the pc). is there any way of importing tables from msaccess database to other one. or any opther kind of a solution please . waiting for ur replyy. tejaswi.

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      Import how ? Excel is NOT a database. Christian Graus - Microsoft MVP - C++

      B 1 Reply Last reply
      0
      • C Christian Graus

        Import how ? Excel is NOT a database. Christian Graus - Microsoft MVP - C++

        B Offline
        B Offline
        BlackDice
        wrote on last edited by
        #3

        Christian Graus wrote: Excel is NOT a database. No, Excel is not a database. However, using ADO, you can access it like it is. As far as the exporting goes, if you're using automation, there are functions for transferring an Access table to Excel, I don't know about the reverse. My articles BlackDice

        L 1 Reply Last reply
        0
        • B BlackDice

          Christian Graus wrote: Excel is NOT a database. No, Excel is not a database. However, using ADO, you can access it like it is. As far as the exporting goes, if you're using automation, there are functions for transferring an Access table to Excel, I don't know about the reverse. My articles BlackDice

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

          reverse is not required now. its sufficient if i can access the data of the other database - ms access . pls tell those functions for importing tables to excel here i am using atomaton only. how to import. actually in my case i am using l is using the Cdatabase object with 'MICROSOFT EXCEL DRIVER'. and creating ,writing an dupdating tables into excel. -- modified at 10:39 Tuesday 27th September, 2005

          S 1 Reply Last reply
          0
          • L Lost User

            reverse is not required now. its sufficient if i can access the data of the other database - ms access . pls tell those functions for importing tables to excel here i am using atomaton only. how to import. actually in my case i am using l is using the Cdatabase object with 'MICROSOFT EXCEL DRIVER'. and creating ,writing an dupdating tables into excel. -- modified at 10:39 Tuesday 27th September, 2005

            S Offline
            S Offline
            S Douglas
            wrote on last edited by
            #5

            tejaswi_teja wrote: reverse is not required now. its sufficient if i can access the data of the other database - ms access . pls tell those functions for importing tables to excel here i am using atomaton only. how to import. actually in my case i am using l is using the Cdatabase object with 'MICROSOFT EXCEL DRIVER'. and creating ,writing an dupdating tables into excel. If I understand correctly and I'm not sure I do, you want to export rows from an Access database to and Excel Workbook Correct? If so doing that is easy (using ADO). objDB.Execute _ "SELECT * INTO [Excel 8.0;DATABASE=" & strExcelFileLocation & _ "].[" & strWorksheet & "] FROM " & "[" & strTableName & "]" Importing rows from an Excel Workbook theoretically shouldn’t be much more difficult (never tried it my self but should work). Create a valid data connection to the workbook (using ADO) Open a client side record set. Close the connection to the Excel file. Open a connection to the Access database, Attach the above record set to the data connection and update. Hope that helps... ------------------------------- DEBUGGING : Removing the needles from the haystack.

            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