That's the issue. I put them into a form textbox (disabled) because the user
can also on that form (both parent and child) call up pop-up's that need
those numbers to also associate that record to.
i.e if you're on the child record and it's number is 1-1 then if you pop-up
the upload image modal form then that image is associated to that number
also. For retrieval later so that specific detail record number.
The big issue isn't the parent becuase I can get that and make it unqiue,
the child has the chnace to have multiple users adding to it (small
possiblity) so if I assign it the numbering sequence of 1,2,3... then if 3
has been assigned (by routine checking last detail/child record) and then
another user adds a record and gets the same number because the 1st user has
not saved their record. It's a small chance, but a chance nonetheless. I
could "lock" the child/detail table but that would kill all other users
working/adding new parents and children to them. And since it's a new record
and not modifying an existing one I can't lock it either. Unless there is a
way to lock based on a serach criteria (i.e. if parent = "1" then lock all
associated child records)??????
Make sense?
"John Saunders" wrote:
"Chris" <Ch***@discussions.microsoft.com> wrote in message
news:F0**********************************@microsof t.com... Before I started to create table, etc to track unique form field record
number assigments I thought I'd check to see if there is now a better way
to
do this in .NET.
I have a parent form (table) and children form (table). Relationship
equals
one to many. I'd like to auto number the fields accordingly and
traditionaly
I assign a unique number based on a table value that I retrieve + 1.
i.e.
Parent record field value = 1
Children record field value = 1-1, 1-2, 1-3
I assume that I could get the next field auto-increment interger for the
parent table record and assign my parent field to it. But what about the
child field then that I need to relate to that parent for each child? Make
sense?
Do I search the child table getting results for number of records for
parent
match then add 1 to it? I would think that there is a better way now.
A simple way to uniquely number the parent record and the child, with the
child record also having the parent assigment value. But the child has to
start at one each time. Can I do this in my SQl Server 2K field
properties?
What are you planning to do with the field numbers?
John Saunders