Thanks a lot, Chad! Knowing "nothing about nothing," I've stared at this code for a week now and think I understand it.
I went into the db and looked at those two respective tables - DynamicForms_Question and DynamicForms_QuestionResponse.
And then the code made sense; all of the responses are in 1 column! I also say the unique keys, so I see what you are doing....pairing all the responses together for the form based on similar keys...more or less?
After reading you response and never having created a stored procedure, I think you suggestion about creating my own table and using a Dynamic SQL Event within the completion events to insert the data into that table would be my best bet.
So I would, using my 3 basic forms for hotels, flights, rental cars, create 3 tables named, say, hotels, flights, cars.
Then create a column for each question (e.g., check_in, car_class, depart_air, city, state, et al)?
Then create an SQL event that writes each field to the respective column? Something like (using your example):
Insert Into Hotels(Name, City, State) Values('$(HName)', '$(HCity)', '$(HState)') ?
What I can't visualize is how the rows/columns would be setup so that when a user selects, say, hotels in New York, it will return all hotels submitted for New York with the respective price, hotel name, etc.. I am assuming that each row would need a unique key and then pull all the data for that key?
If I could get the data into a clean table with individual columns for each field, I am confident I could get the gridview done on my own...but with all the responses in one column, I am totally clueless, as you can tell.