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

how to update/insert from one access DB to another

Hi,

I am really new at Access but have been reading and trying to learn. I hope someone can help me figure out how to either update or insert records from one DB table to another database table. There is an extra complexity because of the fact that I only want to update a few of the fields in the existing database's record with new data. Obviously if there isn't an existing record in the base DB I would want to insert the incoming record.

Would I use Visual Basic to do this? I'm in a time crunch as I have been asked to do this by my boss even though he knows I don't know Access. My job is totally unrelated to this but of course I am interested in learning VB and Access!

Thanks in advance for any help.

Cheers.

Bob
Jan 15 '07 #1
3 2813
perhaps u can try with a select stat and follow up insert stat using sql query.

Hi,

I am really new at Access but have been reading and trying to learn. I hope someone can help me figure out how to either update or insert records from one DB table to another database table. There is an extra complexity because of the fact that I only want to update a few of the fields in the existing database's record with new data. Obviously if there isn't an existing record in the base DB I would want to insert the incoming record.

Would I use Visual Basic to do this? I'm in a time crunch as I have been asked to do this by my boss even though he knows I don't know Access. My job is totally unrelated to this but of course I am interested in learning VB and Access!

Thanks in advance for any help.

Cheers.

Bob
Jan 16 '07 #2
NeoPa
32,556 Expert Mod 16PB
Hi,

I am really new at Access but have been reading and trying to learn. I hope someone can help me figure out how to either update or insert records from one DB table to another database table. There is an extra complexity because of the fact that I only want to update a few of the fields in the existing database's record with new data. Obviously if there isn't an existing record in the base DB I would want to insert the incoming record.

Would I use Visual Basic to do this? I'm in a time crunch as I have been asked to do this by my boss even though he knows I don't know Access. My job is totally unrelated to this but of course I am interested in learning VB and Access!

Thanks in advance for any help.

Cheers.

Bob
Firstly, maybe not intuitively, databases generally separate INSERT INTO (append) from UPDATE queries. These two items must be done separately.
Secondly, apart from saying the above, there's little more that can be done without any information as to your database (table) structures and how they all fit together.
You could look at this thread (Basic SQL Syntax for Access Queries) for help or post MetaData for your two tables :
Posting Table/Dataset MetaData
Expand|Select|Wrap|Line Numbers
  1. Table Name=tblStudent
  2. StudentID; Autonumber; PK
  3. Family; String; FK
  4. Name; String
  5. University; String; FK
  6. MaxMark; Numeric
  7. MinMark; Numeric
Jan 16 '07 #3
Thanks NeoPa and technocraze, I appreciate the pointers...
Jan 17 '07 #4

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

Similar topics

7
by: jason | last post by:
Is there a way - possibly a disconnected rs? - to update the contents of an existing pulldown on a page without having to re-submit the page for the user to see the pulldown populated with an...
12
by: jimserac | last post by:
I had previously posted this in an Access forum with negative results so will try here. Although this question specifies an Access database, I also wish to accomplish this with a large MS SQL...
16
by: robert | last post by:
been ruminating on the question (mostly in a 390/v7 context) of whether, and if so when, a row update becomes an insert/delete. i assume that there is a threshold on the number of columns of the...
9
by: joun | last post by:
Hi all, i'm using this code to insert records into an Access table from asp.net, using a stored procedure, called qry_InsertData: PARAMETERS Long, Long, Text(20), Long, DateTime; INSERT...
15
by: graham | last post by:
Hi all, <bitching and moaning section> I am asking for any help I can get here... I am at the end of my tether... I don;t consider myself a genius in any way whatsoever, but I do believe I have...
6
by: Tom Allison | last post by:
I seemed to remember being able to do this but I can't find the docs. Can I run a sql query to insert new or update existing rows in one query? Otherwise I have to run a select query to see if...
0
by: mwenz | last post by:
I am trying to update an Access table using OLEDB in VB.Net 2005. I can add rows but I cannot update them. Code to instantiate the Access database and table... Dim conn As New...
13
by: Terry Olsen | last post by:
I'm using OleDb to connect with an Access Database. I have anywhere from 10 to over 100 records that I need to either INSERT if the PK doesn't exist or UPDATE if the PK does exist, all in a single...
3
by: Michel Esber | last post by:
Hi all, DB2 V8 LUW FP 15 There is a table T (ID varchar (24), ABC timestamp). ID is PK. Our application needs to frequently update T with a new value for ABC. update T set ABC=? where ID...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: 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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.