473,847 Members | 1,729 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Insert data into 6 different tables

Hi5
Hi,

Any Idea how, I can make an Insert statement to insert data into 6
different tables, that are all holding all data of my database?

Is there any example?

I would be grateful if you could let me know of the ways to view data
in a query and then add data to database

Many thanks

Nov 13 '05 #1
9 6593
Helpful answers require one or more of the following:

1. A Clear and Complete Question with background sufficient that we
have a clue about what you are talking;
2. A Lucky Guess;
3. A Responder who is at the same stage of bewilderment as the poster.

The third may not lead to long term gain.

Nov 13 '05 #2
Hi5
Well Here is the my data tables:
1-Client
2-CChar
3-Category
4-Desc
5-Info
6-Other info (Optional)

relation ships are as follows:
Client 1 to many Ccahr
CLIENT 1 to many info
Info many to 1 to Desc
Cchar 1to many to Info
Cchar many to 1 to category

Now I sopuse the info is more or less soficient!!

Could you plaese help ma?

Many Thanks

Access newbie

Nov 13 '05 #3
Hi5 wrote:
Hi,

Any Idea how, I can make an Insert statement to insert data into 6
different tables, that are all holding all data of my database?


An INSERT statement will insert into just one table, in the reach of my
knowledge.
If the table structure is the same, you made a design error that must be
corrected.

--
Bas Cost Budde, Holland

Nov 13 '05 #4
Hi5 wrote:
Any Idea how, I can make an Insert statement to insert data into 6
different tables, that are all holding all data of my database?


No, an insert statement has a structure such that you insert into ONE table.

You will need six separate statements with criteria to make sure that
you get six separate sets of data.

However, if these six tables have the same data structure, it would be
silly in the extreme to have six separate tables.
--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Whatcha doin?" - Ditto "TIM-MAY!!" - Me
Nov 13 '05 #5
Hi5
Hi,
Many thanks for your answer, Of course the datasets are different.
we have the Primary and foriegn keys that are numbers and are the same
in all realated tables,to make it simple I.E.
I need to input client from a dropdown and category from a text box in
one go is there any way of doing that?
many thanks

Nov 13 '05 #6
I cannot think of a way to update or insert into multiple tables
related as many to one.
Typically in Access we use a forms and subforms to edit sych a
relation. I don't use subforms per se, but I believe that six is more
than the Access limit.
Regardless, SQL Insert Statements are very efficient, and running off
six in succession should be almost instantaneous.

Nov 13 '05 #7
Hi5 wrote:
Hi,
Many thanks for your answer, Of course the datasets are different.
we have the Primary and foriegn keys that are numbers and are the same
in all realated tables,to make it simple I.E.
I need to input client from a dropdown and category from a text box in
one go is there any way of doing that?
many thanks


Are you talking here about inputting the client that is chosen from the
drop down - "combo box" in Access - and whatever is in the text box into
a table, as a a single record?

Or, does the client from the combo box tell you what table the text box
needs to made a record of?

Or, will the client choice in the combo box specify what records from
another table need to be inserted into a specific table?

The way to do this is in code, associated with a command button, that
writes the SQL statement you need and the executes it. You can figure
out how to write the SQL statement by setting one up on the Access query
design window and then switching to SQL View (Click View->SQL View).
Copy the SQL and break it up to put in values from the text box and the
combo box in the appropriate places.

If you're not sure how to write the code, respond back with an answer on
the questions I make above and I'll try to show you how to do this -
enough at least, to set you on your way! 8)
--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Whatcha doin?" - Ditto "TIM-MAY!!" - Me
Nov 13 '05 #8
"ly******@yahoo .ca" <ly******@yahoo .ca> wrote in
news:11******** *************@f 14g2000cwb.goog legroups.com:
I cannot think of a way to update or insert into multiple tables
related as many to one.
Typically in Access we use a forms and subforms to edit sych a
relation. I don't use subforms per se, but I believe that six is
more than the Access limit.
Regardless, SQL Insert Statements are very efficient, and running
off six in succession should be almost instantaneous.


And likely should be wrapped in a transaction.

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
Nov 13 '05 #9
Hi5
Hi,
Yes some data is to be selected from drop down and some fields are to
be filled by typing the data in.
That's very kind if you can show me how to code both of them
many thankls

Nov 13 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
3091
by: Pesko S | last post by:
Hi, Could anybody just point me in a direction where I can find information on how the heck I can update a database with relational data from an XML file. I use stored procedures to insert the data. And I am NOT storing the xml in the database. I want to map the xml elements to the database columns. I am about to start peeling my skin off in frustration about this. There
5
4137
by: Paul Shaw | last post by:
Can anyone explain why an insert might cause multiple logical bufferpool data reads? Here's a situation that has me scratching my head. Table A's data resides in tablespace B Table A's indexes reside in tablespace C Table A has no long data No other data resides in either of these tablespaces.
16
3883
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 table, or perhaps bytes, being updated where the engine just decides, screw it, i'll just make a new one. surfed this group and google, but couldn't find anything. the context: we have some java folk who like to parametize/
8
6305
by: Carl | last post by:
Hi, I hope someone can share some of their professional advice and help me out with my embarissing problem concerning an Access INSERT query. I have never attempted to create a table with one-to-one relationship but on this occasion I must keep username/password details within a seperate table. Here's the basic specs and database schema: -------------------------------------------
8
7261
by: carlospedr | last post by:
I have to insert data from about 30 tables into a single table (Users), to do so i used a cursor and a bit of dynamic sql, this should work fine if the tables have to do the select from had the same number of columns, how ever they don't. I only need the first 5 columns from each the table, in the case where they have more than the 5 i need for my 'Users' table i get this error: 'An explicit value for the identity column in table 'Users'...
9
3226
by: David Eades | last post by:
Hi all Complete newbie here, so apologies if this is the wrong forum. I've been asked to use mysql and asp to make a simple bidding system (rather like a simple ebay), whereby users can use a web browser to view a highest bid and can make a bid. My question is; how can I be sure that when a user submits a bid, that another user isn't also currently submittimg a bid, i.e i can tell user A
8
3528
by: nano2k | last post by:
Hi Shortly, I keep invoices in a table. Occasionally, someone will fire the execution of a stored procedure (SP) that performs several UPDATEs against (potentially) all invoices OLDER than a date that is supplied to the SP as a parameter. The SP is usually a lengthy process (it takes at least 30 mins). The problem is that SQL server 2000 Dev Edition doesn't allow me to insert new invoices that are "younger", while the SP is executing....
21
4706
by: lesperancer | last post by:
I've got an access97 reporting mdb that pulls data (77,000 rows) from a sql server table into a local table to run reports if the local table is part of the reporting MDB, the insert statement (16 fields) takes less than 30secs, but because of db-bloat, I moved the local table to a 2nd MDB and per postings, this 2nd MDB is copied into a folder and linked as a 'temp' MDB every time I run my reporting mdb
3
4714
by: iKiLL | last post by:
Hi all I am having problems getting my SqlCeDataAdapter to Update the SQL Mobile Data base. i am using C# CF2. I have tried this a number of different ways. Starting with the command builder but eventually i wrote out the entire command my self, and still nothing. The only thing that i can think this that because i am trying to add a table that is created outside the data adaptor and then Merge/Copy the data into
0
9886
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10983
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10647
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10706
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10338
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7882
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5719
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5911
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4528
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.