I bring back a strongly typed dataset, which has the following structure:
I populate a datatable with this info.Code:<?xml version="1.0" encoding="utf-8" ?> <xs:schema id="dsQuestions" targetNamespace="http://tempuri.org/dsQuestions.xsd" elementFormDefault="qualified" attributeFormDefault="qualified" xmlns="http://tempuri.org/dsQuestions.xsd" xmlns:mstns="http://tempuri.org/dsQuestions.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> <xs:element name="dsQuestions" msdata:IsDataSet="true"> <xs:complexType> <xs:choice maxOccurs="unbounded"> <xs:element name="Questions"> <xs:complexType> <xs:sequence> <xs:element name="QuestionResultKey" type="xs:integer" minOccurs="0" /> <xs:element name="QuestionnaireInstanceKey" type="xs:integer" minOccurs="0" /> <xs:element name="QuestionKey" type="xs:integer" minOccurs="0" /> <xs:element name="QuestionnaireKey" type="xs:integer" minOccurs="0" /> <xs:element name="Type" type="xs:integer" minOccurs="0" /> <xs:element name="Size" type="xs:integer" minOccurs="0" /> <xs:element name="Required" type="xs:boolean" minOccurs="0" /> <xs:element name="QuestionNo" type="xs:string" minOccurs="0" /> <xs:element name="Question" type="xs:string" minOccurs="0" /> <xs:element name="Answer" type="xs:string" minOccurs="0" /> </xs:sequence> </xs:complexType> </xs:element> </xs:choice> </xs:complexType> </xs:element> </xs:schema>
Answer field is a textbox in the grid.
So, I populate a grid, enter in values into the textboxes, click save.
This is where I am stuck.
I want to save the answers back to the db?
Can I recreate my strongly typed ds from the grid data?
Or should I just return the main ID, and the answer, and using thsese 2 values then call a function to update the DB?
Woka


Reply With Quote