UniqueID as primary key in Infopath

I

IT PHYTOSAN

I would like to autogenerate a UniqueID as the primary key in an SQL
database. The dilemma I have that primary keys are required fields and unless
I have an entry in this field in infopath I can not submit the form.

Any clues?

Arved
 
M

Marie

can't you just not include this field in your database connection, and set
the column as identity on the db, then when the record is added to the db the
field will increment.
 
I

IT PHYTOSAN

Thanks for your help. The problem is that a primary key is a required field.
I therefore can not submit from infopath to sql without entering a value.

Thanks

IT PHYTOSAN
 
F

Franck Dauché

Hi,

Can't you then do the other way around? remove the ID from your data
connection. This way, IP won't know anything about you unique ID. When you
submit your form, a new row with be created and a new ID will be assigned by
SQL Server. If all your fields are blank (in IP), the form can be closed
without being submitted.

Franck Dauché
 
I

IT PHYTOSAN

Wow, great idea. I'll get right to it and let you know how it went.

IT PHYTOSAN
 
Top