G
Guest
I have an interesting problem. I need to create a page that has a few text
boxes for info like name, address, etc. Also on that page will be a
datagrid that allows for dynamic insert (via footer). The data from the
datagrid will be in tblActivities and the info (name, address, etc.) will be
in tblForm. I need to relate this data. I figure I should insert a blank
record into tblForm upon page load and return @@identity from an identity
column. I could then use this identity val for updating data (name,
address, etc.) in tblForm when the submit btn is clicked. I could also use
this identity val for the foreign key in tblActivities when inserts from the
datagrid occur. This sounds like it'll work and relate the data between the
tables, however, a few concerns. What if a user opens the page, doesnt do
anything, then closes the page by simply closing the browser... a blank
empty record will now be in tblForm. There are also other concerns. Know
what I mean? How would you recommend I accomplish this so that I can have a
form with an auto number as well as a datagrid on the page that allows for
inserts? I'd appreciate any feedbback. Thanks a lot.
boxes for info like name, address, etc. Also on that page will be a
datagrid that allows for dynamic insert (via footer). The data from the
datagrid will be in tblActivities and the info (name, address, etc.) will be
in tblForm. I need to relate this data. I figure I should insert a blank
record into tblForm upon page load and return @@identity from an identity
column. I could then use this identity val for updating data (name,
address, etc.) in tblForm when the submit btn is clicked. I could also use
this identity val for the foreign key in tblActivities when inserts from the
datagrid occur. This sounds like it'll work and relate the data between the
tables, however, a few concerns. What if a user opens the page, doesnt do
anything, then closes the page by simply closing the browser... a blank
empty record will now be in tblForm. There are also other concerns. Know
what I mean? How would you recommend I accomplish this so that I can have a
form with an auto number as well as a datagrid on the page that allows for
inserts? I'd appreciate any feedbback. Thanks a lot.