Auto asign id when submitting form?

J

JuJu

Is there a way to auto populate an id field when
submitting to an SQL table? (The id field is the primary
key in the table.) So the user can't control the id, but
it gets auto populated with the number following the last
id in the table?

Thanks!
 
S

Steve van Dongen [MSFT]

Is there a way to auto populate an id field when
submitting to an SQL table? (The id field is the primary
key in the table.) So the user can't control the id, but
it gets auto populated with the number following the last
id in the table?

Thanks!

Define the database column as an identity column. InfoPath will throw
away any value in the node when it inserts new records into the
database. Of course, if you're submitting via a webservice or custom
code then it will be up to you to do the right thing.

Regards,
Steve
 
G

Guest

That works perfectly. Thank you!
-----Original Message-----


Define the database column as an identity column. InfoPath will throw
away any value in the node when it inserts new records into the
database. Of course, if you're submitting via a webservice or custom
code then it will be up to you to do the right thing.

Regards,
Steve
--
Please post questions to the newsgroup; everyone benefits.
This posting is provided "AS IS" with no warranties, and confers no rights.
Sample code subject to http://www.microsoft.com/info/cpyright.htm
.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top