473,378 Members | 1,134 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,378 software developers and data experts.

Problem with Appending Tables

I'm trying to append some data from one table to another table both the table structure are same. I have an attachments field in both tables but it seems that i cannot append the attachments from one table to the other.

I get the following error when trying to just append the attachments field to the appropriate field:

"An INSERT INTO query cannot contain a multi-valued field"
I also get the following error when trying to append the attachments sub fields to the appropriate sub field;

"An INSERT INTO query that contains a multivalued field cannot contain another field"
Has anyone found a way of merging, appending or updating databases with attachments?????

Many thanks in advance for any help.


Manoj Kumar
Apr 23 '09 #1
3 4426
ChipR
1,287 Expert 1GB
This is not going to be quite so simple. You may want to take a look at How to: Work With Attachments In DAO
Apr 23 '09 #2
I am not able to do this... Is there any other option to do this..


Thanks
Manoj Kumar
Apr 23 '09 #3
Stewart Ross
2,545 Expert Mod 2GB
Chip has very helpfully found an MSDN entry on how to process a set of attachments and provided the link for you. Extracting the attachments is not inherently difficult; it amounts to processing a child recordset (containing the attachments) from a parent recordset (containing the records with the attachment fields). The MSDN article provides code samples which can be copied straight into your own project.

Attaching them to the other table may be more of a challenge, but in effect it is just the reverse of extracting them. You would loop through your parent recordset, and as you do so you would add entries to the other table. When it comes to the attachments, instead of saving them (which is what the MSDN article does) you would attach them to the attachment field of the current record that has been copied into the second table.

It is unlikely that a simpler way to deal with copying such attachments is available.

-Stewart
Apr 24 '09 #4

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

Similar topics

6
by: Fnark! | last post by:
I am creating a shopping cart using PHP Version 4.1.2. I am creating and registering a cart object in a session. The cart object contains an array of arrays called $order whose elements are a...
2
by: freeagent | last post by:
Help!! I am a complete Access newbie and I have to concatenate about 30 tables into one large table. All these tables have the same column headings as each other. For example, I have TABLE...
1
by: Eli Sidwell | last post by:
I have an Access DB that contains 5 tables for the last 5 years. All 5 tables have the same structure. I wanted to keep each year separate for organizational purposes. But, I want to query all 5...
4
by: jasper | last post by:
How can this be done? Thanks
13
by: Shwetabh | last post by:
Hi, I wanted to know if it is possible to do to append two tables into a third table. For example, consider these two tables Table 1...
1
by: meacho | last post by:
i'm trying to append 5 tables the problem is that although most of the columns are the same the are on or two or so unique columns in each table. I would like to append the tables creating one table...
1
by: KiddoGuy | last post by:
I am trying to build a string character by character. However, when I use the overloaded += or string.append() method, the character replaces the one before it rather than appending to it so I am...
13
by: yueying53 | last post by:
I am new to creating a list of classes. Hence I checked out this website: http://www.daniweb.com/code/snippet390.html. However, I modified the code to check if a class with a particular has been...
1
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: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.