submitting to access database

submitting to access database

Post by U3BlZWRNb2 » Mon, 11 Jul 2005 06:21:02


I know this will sound like a newb question but I am currently teaching
myself infopath and databases.

I have a infopath form that has a connection to a database. Part of the form
is normal text boxes and date pickers. The bottom has a repeating table with
2 text boxes and a datepicker. When I submit it, it works fine except that
everything after the first item on the repeating table is just entered into
by itself with none of the top info

Like say I had Shipper, address, and dates on the top and then in the
repeater at the bottom I had items listed like apples, oranges, grapes, and
pears. When submitted the apples would have the shipper and address and
dates entered with it but the oranges, grapes and pears would be by
themselves with no address or anything

Is there a way to get all the top info to be entered into the database
multiple times with each item on the repeating table ?
 
 
 

submitting to access database

Post by shei » Tue, 12 Jul 2005 21:48:21


Hi,

If I understand correctly, then it sounds like you are trying to
"denormalize" the data in your database. Let me explain:

- Let's say you have 3 tables: Customers, Orders and Order Details
- One customer can have many Orders and one Order can have many Order
Details

The way you would want to set this up in your database is as follows:

- Customers table with CustomerID as primary key
- Orders table with OrderID as primary key and CustomerID as foreign key
back to Customers
- Order Details table with an OrderID & ProductID as a compound primary
key (this way an order can only have one instance of a product)

At any rate, what I am getting to with this is that all of the "Customer"
information is *not* repeated in the Orders table and all of the "Order"
information is *not* repeated in the Order Details table. These tables are
related simply on 1 or 2 fields.

So based on your question, it sounds like you are trying to repeat Shipper
information for each "detail" item (i.e. apples, oranges, etc.) and this is
really not what you want to do.

If you have not done so yet, take a look at the Northwind sample Access
database and how the relationships are setup - this may help in your
endeavor.

Best Regards,

Scott L. Heim
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights.
{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fprq2\fcharset0 MS Sans Serif;}}
\viewkind4\uc1\pard\f0\fs20 Hi,
\par
\par If I understand correctly, then it sounds like you are trying to "denormalize" the data in your database. Let me explain:
\par
\par - Let's say you have 3 tables: Customers, Orders and Order Details
\par - One customer can have many Orders and one Order can have many Order Details
\par
\par The way you would want to set this up in your database is as follows:
\par
\par \tab - Customers table with CustomerID as primary key
\par \tab - Orders table with OrderID as primary key and CustomerID as foreign key back to Customers
\par \tab - Order Details table with an OrderID & ProductID as a compound primary key (this way an order can only have one instance of a product)
\par
\par At any rate, what I am getting to with this is that all of the "Customer" information is *not* repeated in the Orders table and all of the "Order" information is *not* repeated in the Order Details table. These tables are related simply on 1 or 2 fields.
\par
\par So based on your question, it sounds like you are trying to repeat Shipper information for each "detail" item (i.e. apples, oranges, etc.) and this is really not what you want to do.
\par
\par If you have not done so yet, take a look at the Northwind sample Access database and how the relationships are setup - this may help in your endeavor.
\par
\par Best Regards,
\par
\par Scott L. Heim
\par Microsoft Developer Support
\par
\par This posting is provided "AS IS" with no warranties, and confers no rights.
\par
\par }

 
 
 

submitting to access database

Post by RnJhbmNrIE » Sat, 15 Oct 2005 13:14:02

Hi,

Did you try these steps suggested by Scott Heim from MS in this forum:

InfoPath makes use of Internet Explorer's security - as such, if you want
to eliminate this prompt complete the following steps:

- Launch Internet Explorer
- From the Tools menu choose Internet Options
- Select the Security tab
- Assuming you are on a "Local Intranet" select this option and then click
the Custom Level button
- Scroll to the section: Miscellaneous and enable the option: "Access data
sources across domains"

Hope that it helps.

Regards,

Franck Dauch
 
 
 

submitting to access database

Post by Z25hbm » Sat, 15 Oct 2005 13:59:52

Hi,
how do i submit the data to access database thru managed code.
When i try to open the connection to database security exception.
Please help me

Thanks!