Hello,
I imagine you're talking about SQL and creating a database-bound InfoPath form. You have to create the database first, then allow InfoPath to create the form based on that (see attached screenshot).
We don't work much with database bound forms because, well, they are database bound. :) That is, once created, you can't go back and change the schema easily. Submitting to SQL is a classic InfoPath problem and here are options discussed in an earlier thread:
If you create your form using an XML Schema
(File->Design...->New from Blank) you can't submit directly to a
DB. That's because the schema is XML and not based off SQL data types.
Submitting directly to a DB after form creation was never an option in
InfoPath.
If you create your form from a DB, you already have the submit data
connection built in.
Best practice here is to submit to a Web Service as an XML string.
Have the Web Service handle the mapping to SQL. Then, one Web Service
can handle any form. This is the way Qdabra's Web Service Suite (DBXL)
works. Free downloads and very inexpensive licenses will save you a lot
of time and money.
There are other previous discussions which all point to the three solutions:
(a) You create a db-bound form.
(b) You write/maintain your own web service.
(c) You use a product like DBXL to map the data from InfoPath to SQL.
This is a great post which covers b and c. Good luck!