Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / September 2005

Tip: Looking for answers? Try searching our database.

Repeating section and database

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jamesy - 01 Sep 2005 14:45 GMT
Hi folks,
I am using SQL Server as the "submit" main data connection for my form. I
would like to add a repeating section to my form, but don't know the datatype
for the column in SQL Server to bind the control to it.

Any suggestions would be gratefully received.

Many thanks,

Jamesy
Scott L. Heim [MSFT] - 01 Sep 2005 15:15 GMT
Hi Jamesy,

This may be easier:

- Display the Data Source Task Pane
- Expand the "dataFields"
- Drag the "table" that contains your data to your form and release
- Select Repeating Section with Controls
- If there are more fields that what you want, simply delete those from the
Repeating Section (not from the actual Data Source!)

Let me know if this works!

Scott L. Heim
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights
Jamesy - 01 Sep 2005 15:40 GMT
Hi Scott,
I tried your advice thanks. However, I need to populate both tables from the
form - and can only see how to add one datasource of SQL Server connection as
a "submit" source - when originally creating the form.

Am I being dim here?

Many thanks,

Jamesy

> Hi Jamesy,
>
[quoted text clipped - 13 lines]
>
> This posting is provided "AS IS" with no warranties, and confers no rights
Scott L. Heim [MSFT] - 01 Sep 2005 17:45 GMT
Are the tables "related?" For example, "one" customer could have "many"
orders so a Customers and Orders table would be related on a CustomerID
field.

Scott L. Heim
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights
Jamesy - 02 Sep 2005 08:35 GMT
Hi Scott,
Yup there is a relationship. This is a travel booking system, so someone
could need to book X number of flights per trip - hence I'm using a repeated
section for flights, another for hotels etc.

Jamesy

> Are the tables "related?" For example, "one" customer could have "many"
> orders so a Customers and Orders table would be related on a CustomerID
[quoted text clipped - 4 lines]
>
> This posting is provided "AS IS" with no warranties, and confers no rights
Scott L. Heim [MSFT] - 02 Sep 2005 13:02 GMT
Hi Jamesy,

Then you should be good to go. When you created your InfoPath solution, you
created it from the database...correct? If so, you would simply need to
include the tables you need. For instance - let's take Customers, Orders
and Order Details. One customer can have zero or more orders and each order
can have zero or more line items. So when I create an InfoPath solution to
enable adding/editing these pieces of information, I first add the
Customers table, then the Orders and finally the Order Details.

Now if you are familiar with these tables, you will know there are other
fields such as EmployeeID, Shipper, etc. If you notice, I did not include
those in my "main" data source - these would be considered secondary data
sources and I would use them in conjunction with a drop-down list so the
user can simply select a Shipper.

So with my main data source consisting of Customers, Orders and Order
Details, I can add a new customer by itself or immediately include an order
with or without line items. In addition, I could query for, say, a
CustomerID and then modify all or any one of the tables. In each case, when
I click the Submit button the appropriate table(s) will be updated.

I do hope I am not making this more confusing for you. If this still does
not make sense, let me know and I will provide the steps to see this work
using the Northwind sample database.

Scott L. Heim
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights
Jamesy - 08 Sep 2005 08:35 GMT
That's perfect thanks Scott. I have to say that, the more I use this product,
the more impressed I am.

Many thanks for all your help.

Jamesy

> Hi Jamesy,
>
[quoted text clipped - 26 lines]
>
> This posting is provided "AS IS" with no warranties, and confers no rights
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.