473,320 Members | 2,124 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Merging Two Access DATABASES

6
Hi All,

Just joined this site....I am really stuck into one problem. Actually I am writing a code in VB6 to merge TWO ACCESS DATABASES. Wanted to know if I can use a single sql query to merge. Is MERGE or UNION effective in merging two DATABASES. Plz help.
I am looking forward to get some positive replies.
Thanx in advance.

Gaurav
Jan 7 '08 #1
6 4193
gaubun
6
and yeah I forget to mention that structures are same.

Gaurav
Jan 7 '08 #2
and yeah I forget to mention that structures are same.

Gaurav
No sure what you want. But it seems that you have two Access database and you want to access data of both databases.

You can create a Link Objects (Table /Query) of Database A, into Database B and Query them.
Jan 7 '08 #3
gaubun
6
No sure what you want. But it seems that you have two Access database and you want to access data of both databases.

You can create a Link Objects (Table /Query) of Database A, into Database B and Query them.

Hi vksingh

In simple words...I want to combine to identical Access databases into one and that to from vb6. Just need a hint to get started....can I do this by using adodc? or should I have to use some database object like
"dim db1 as database"
but I don't know how to manipulate this object? Jz need a little help.

Gaurav
Jan 7 '08 #4
jaxjagfan
254 Expert 100+
Hi All,

Just joined this site....I am really stuck into one problem. Actually I am writing a code in VB6 to merge TWO ACCESS DATABASES. Wanted to know if I can use a single sql query to merge. Is MERGE or UNION effective in merging two DATABASES. Plz help.
I am looking forward to get some positive replies.
Thanx in advance.

Gaurav
If the 2 have identical field types then union will work. Just make a UNION query.

Select TableA.* From TableA;
UNION
Select TableB.* From TableB;

You will end up with the column names from TableA as column names.

I am unsure of the VB syntax it differs a little with VBA. It depends on the display method (Form, datagrid, report, etc)
Jan 7 '08 #5
FishVal
2,653 Expert 2GB
Hi All,

Just joined this site....I am really stuck into one problem. Actually I am writing a code in VB6 to merge TWO ACCESS DATABASES. Wanted to know if I can use a single sql query to merge. Is MERGE or UNION effective in merging two DATABASES. Plz help.
I am looking forward to get some positive replies.
Thanx in advance.

Gaurav
Hi, gaubun.

Do you want to work with both as a single one or do you want work with each?
If you are mentioning the first, then I would like to stay that it is generally a bad practice.
  • all datasets obtained with UNION operation will be read-only
  • to tell nothing about indexed fields duplicating
  • etc

Is that an option to import all info from one db to another and work with the latter only? Or from some special reasons you want to stay with this configuration?

Regards,
Fish

P.S. Or you just want to retrieve only some special information?
Jan 7 '08 #6
gaubun
6
Hi, gaubun.

Do you want to work with both as a single one or do you want work with each?
If you are mentioning the first, then I would like to stay that it is generally a bad practice.


Hi Fish,

Thanx for your concern.
"Do you want to work with both as a single one or do you want work with each?
If you are mentioning the first, then I would like to stay that it is generally a bad practice."


Actually I am merging some village databases to its upper level i.e Subcenters or SCs database and then will use latter to generate reports. I am not going to manipulate ANY OF THE VILLAGE DATABASES. SC database is a temporary one...used only for report generations.
Suppose if I have two village databases (A and B) and one EMPTY DATABASE WITH SAME STRUCTURE (i.e C)
Now what I want is.......
C=A+B :-D

Now my problem is how can do this through Programming if Im using vb6 as frontend.

Currently I am connecting through Adodc but my knowledge is limited to
adodc1.recordsource="select......."
adodc1.refersh
adodc1.recordset.....blah blah blah

So how can I truncate/delete SC database and merge village database into it.

I tried to make it very clear.... plz help.
Jan 9 '08 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: TS | last post by:
Does anyone have any experience creating an ODBC Connection to multiple Access databases? I need to be able to connect several databases, rather than linking to the tables. My only experience...
7
by: Joe Wasik | last post by:
Hello, Currently I used Biomobility's DataOnTheRun for the Pocket PC. It's a little slow, but it does exactly what I need -- and it does it well. Unfortunately, now I need to have the same...
12
by: John Ortt | last post by:
Hi There , I am currently managing a number of Access Databases for the company I work for. Recently a number of employees moved to a different site and as such can no longer connect to our...
7
by: bill.brennum | last post by:
Hi, Have a number of Access Databases that I inherited and want to zip a few of them. My concern is that other active Microsoft Applications may be linking to the database or its tables. Is...
9
by: =?Utf-8?B?RnJpdHo=?= | last post by:
Hi all, I am having the following problems in getting Microsoft Visual Studio 2005 Professional to link to an Access .mdb database. Please help me to sort this out. Problem 1: ======= The...
6
by: GregG | last post by:
Greetings, I've inherited a project which requires the use of multiple Access databases, each containing a dozen or so tables each. I need to perform queries which included relations and results...
5
by: hugobotha | last post by:
Hi all, Help will be much apreciated here. How can I query two different access databases that has same table and fields. This is how i access the one database but I want to be able to do it...
13
by: Charlotte | last post by:
Hi, i've googeled to find a asp-script that can compare all the records in two different access databases the mdb's have exactly the same tables what i want is that (the output) all the...
1
by: Lauren Serra | last post by:
I'm attempting to merge multiple Access databases into one. They are all of the exact same format but with different datasets. Using the append tool, I can get all of the data into a single...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.