Sunday, February 19, 2012

Form that creates a temporal table

Hey,
I have a kind-of-newbie question.
I need to create a form that will eventually produce a report in html /
asp.
while in access that would not be a problem, I'm learning my ways
through this project in the asp world.
So, I created an access database that should hold the information
entered by the form and then the report will be just retieval of
information from it.
The thing is that the form is built in the way that you select a few
options and then click "submit" and that's one line in the database,
after you click "produce" it should take all that information you
loaded into the database and make it a report.
How will the report's query look like? how will it know what
information was enterd by that specific user at that time? is there a
way to make a temporal table that starts with the first "submit" and
ends when you click "produce" ?
Thanks,
Tomer.The answer is: primary key.
The procedure that inserts the data should return the primary key of the
newly inserted row after the insert, then you can use the primary key to
retrieve the row(s) that you want to display in the report.
In SQL 2005 this is even simpler - use the OUTPUT statement.
ML

No comments:

Post a Comment