Yesterday I asked a question about a SQL-receive repeating table in a repeating section
, and I got an answer that probably would have been perfectly fine if the project spec didn't suddenly expand.
Now, I need to put a SQL-submit repeating table in a repeating section.
I created a form from a data connection, made the repeating table, and with some creative (and probably not best practice) rearranging ended up with a form that has a repeating table with some of the fields and a few separate text fields that have the rest of the fields. I've got everything stored in one big table in the DB, even though the separate fields should be the same value for every row of the table in a particular instance of a repeating section. If this is confusing...well, just imagine how I feel.
When I try to create a repeating section to stick all of this in, it requires that I bind it to something in the data source, even though I don't want to. When I just attach it to the data fields from the DB like in the repeating table, and then put the table in the section, InfoPath says the data won't store correctly. When I try to preview it, I can insert new items in the repeating section, but not the repeating table - even though there is still an "insert item" button.
Is this sort of thing not allowed? Would I be better off trying to use a one-to-many relationship in the DB and arranging the form that way? If so, how do I do that? Everything I've found while trying to Google it has been related to Access databases, (like this otherwise useful-looking how-to guide), which is a bit of a concern. Would a one-to-many relationship work here? Or do I need to do something else entirely?
P.S. I'm using InfoPath 2003, and Microsoft SQL Server 2005
I've found that I can add a new group that's apparently unattached to the DB, and attach the repeating section to it, and it *almost* works (if I use current() I may be able to force it to work...right now everything in one instance of the repeating section gets copied immediately into all the others), but my main question still stands - should I be using a one-to-many relationship, and if so, how do I do that? Thanks.