Hi,
I'm very new to InfoPath and to this forum (and to programming come to think of it!!!) so I apologies if my questions have been answered already. I'm having difficulties with a project I have been given, so I'll explain the basics of the project then will go through the numerous issues I have. I don't intend on using code yet, though if needs be, I can only do it in VB script.
I am creating an InfoPath 2007 form connected to a Sql Server 2005 database. There are 2 tables (A and B) in Sql Server (they are in a different schema or database, not sure which yet, don't know if that makes a difference). Table A has information on invoices. The form queries this table. The user then updates these records adding in some additional information. The form then needs to submit every field to Table B in Sql Server. Seems quite straightforward to me, but putting it into practise has caused problems.
My issues:
I have created the main data connection to Table B with submitting option checked. That is fine. I then make a secondary connection to Table A set to receive data. So now there are two connections to the Sql db. But I don't really know where to go from here. I am unable to query the secondary data source (there are only datafields, not sure how to incorporate these into the form to get the desired results), and even if I do, I am unable to then submit these queried fields into Table B. The reason being I don't know how to.
- Is it feasible to query a secondary Sql Server db (Table A)?
- Can I submit these queried fields into a new db (Table B)?
- How is all this done?
The project gets more complicated after this (like managerial approval) but I just want to focus on these problems first not to jump ahead.
As I said, I'm sure these have been answered so apologies again, but I must stress how new all this is to me.
Look forward to reading your responses.