Thanks for response Misha. Plesase look. I was create new website for
better look of this problem. There is DataSet1.xsd code, sql scripts
for data tables are above:
<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="DataSet1"
targetNamespace="
http://tempuri.org/DataSet1.xsd"
xmlns:mstns="
http://tempuri.org/DataSet1.xsd"
xmlns="
http://tempuri.org/DataSet1.xsd"
xmlns:xs="
http://www.w3.org/2001/XMLSchema"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"
xmlns:msprop="urn:schemas-microsoft-com:xml-msprop"
attributeFormDefault="qualified" elementFormDefault="qualified">
<xs:annotation>
<xs:appinfo source="urn:schemas-microsoft-com:xml-msdatasource">
<DataSource DefaultConnectionIndex="0"
FunctionsComponentName="QueriesTableAdapter" Modifier="AutoLayout,
AnsiClass, Class, Public" SchemaSerializationMode="IncludeSchema"
xmlns="urn:schemas-microsoft-com:xml-msdatasource">
<Connections>
<Connection AppSettingsObjectName="Web.config"
AppSettingsPropertyName="ConnectionString" ConnectionStringObject=""
IsAppSettingsProperty="True" Modifier="Assembly" Name="ConnectionString
(Web.config)" ParameterPrefix="@"
PropertyReference="AppConfig.System.Configuration.ConfigurationManager.0.ConnectionStrings.ConnectionString.ConnectionString"
Provider="System.Data.SqlClient">
</Connection>
</Connections>
<Tables>
<TableAdapter BaseClass="System.ComponentModel.Component"
DataAccessorModifier="AutoLayout, AnsiClass, Class, Public"
DataAccessorName="pools2TableAdapter"
GeneratorDataComponentClassName="pools2TableAdapter" Name="pools2"
UserDataComponentName="pools2TableAdapter">
<MainSource>
<DbSource ConnectionRef="ConnectionString (Web.config)"
DbObjectType="Unknown" FillMethodModifier="Public"
FillMethodName="Fill" GenerateMethods="Both"
GenerateShortCommands="False" GeneratorGetMethodName="GetData"
GeneratorSourceName="Fill" GetMethodModifier="Public"
GetMethodName="GetData" QueryType="Rowset"
ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089"
UseOptimisticConcurrency="False" UserGetMethodName="GetData"
UserSourceName="Fill">
<SelectCommand>
<DbCommand CommandType="Text" ModifiedByUser="True">
<CommandText>SELECT pools2.pools_id,
pools2.pools_title, pools_questions2.pools_questions_question,
pools_questions2.pools_questions_votes
FROM pools2 INNER JOIN
pools_questions2 ON pools2.pools_id =
pools_questions2.pools_id</CommandText>
<Parameters>
</Parameters>
</DbCommand>
</SelectCommand>
</DbSource>
</MainSource>
<Mappings>
<Mapping SourceColumn="pools_id" DataSetColumn="pools_id"
/>
<Mapping SourceColumn="pools_title"
DataSetColumn="pools_title" />
<Mapping SourceColumn="pools_questions_question"
DataSetColumn="pools_questions_question" />
<Mapping SourceColumn="pools_questions_votes"
DataSetColumn="pools_questions_votes" />
</Mappings>
<Sources>
</Sources>
</TableAdapter>
<TableAdapter BaseClass="System.ComponentModel.Component"
DataAccessorModifier="AutoLayout, AnsiClass, Class, Public"
DataAccessorName="pools_questions2TableAdapter"
GeneratorDataComponentClassName="pools_questions2TableAdapter"
Name="pools_questions2"
UserDataComponentName="pools_questions2TableAdapter">
<MainSource>
<DbSource ConnectionRef="ConnectionString (Web.config)"
DbObjectName="Dxcommerce.dbo.pools_questions2" DbObjectType="Table"
FillMethodModifier="Public" FillMethodName="Fill"
GenerateMethods="Both" GenerateShortCommands="True"
GeneratorGetMethodName="GetData" GeneratorSourceName="Fill"
GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset"
ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089"
UseOptimisticConcurrency="True" UserGetMethodName="GetData"
UserSourceName="Fill">
<DeleteCommand>
<DbCommand CommandType="Text" ModifiedByUser="False">
<CommandText>DELETE FROM [dbo].[pools_questions2]
WHERE (([pools_questions_id] = @Original_pools_questions_id) AND
([pools_id] = @Original_pools_id) AND ([pools_questions_question] =
@Original_pools_questions_question) AND ([pools_questions_votes] =
@Original_pools_questions_votes))</CommandText>
<Parameters>
<Parameter AllowDbNull="False"
AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input"
ParameterName="@Original_pools_questions_id" Precision="0"
ProviderType="Int" Scale="0" Size="0" SourceColumn="pools_questions_id"
SourceColumnNullMapping="False" SourceVersion="Original">
</Parameter>
<Parameter AllowDbNull="False"
AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input"
ParameterName="@Original_pools_id" Precision="0" ProviderType="Int"
Scale="0" Size="0" SourceColumn="pools_id"
SourceColumnNullMapping="False" SourceVersion="Original">
</Parameter>
<Parameter AllowDbNull="False"
AutogeneratedName="" DataSourceName="" DbType="AnsiString"
Direction="Input" ParameterName="@Original_pools_questions_question"
Precision="0" ProviderType="VarChar" Scale="0" Size="0"
SourceColumn="pools_questions_question" SourceColumnNullMapping="False"
SourceVersion="Original">
</Parameter>
<Parameter AllowDbNull="False"
AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input"
ParameterName="@Original_pools_questions_votes" Precision="0"
ProviderType="Int" Scale="0" Size="0"
SourceColumn="pools_questions_votes" SourceColumnNullMapping="False"
SourceVersion="Original">
</Parameter>
</Parameters>
</DbCommand>
</DeleteCommand>
<InsertCommand>
<DbCommand CommandType="Text" ModifiedByUser="False">
<CommandText>INSERT INTO [dbo].[pools_questions2]
([pools_id], [pools_questions_question], [pools_questions_votes])
VALUES (@pools_id, @pools_questions_question, @pools_questions_votes);
SELECT pools_questions_id, pools_id, pools_questions_question,
pools_questions_votes FROM pools_questions2 WHERE (pools_questions_id =
SCOPE_IDENTITY())</CommandText>
<Parameters>
<Parameter AllowDbNull="False"
AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input"
ParameterName="@pools_id" Precision="0" ProviderType="Int" Scale="0"
Size="0" SourceColumn="pools_id" SourceColumnNullMapping="False"
SourceVersion="Current">
</Parameter>
<Parameter AllowDbNull="False"
AutogeneratedName="" DataSourceName="" DbType="AnsiString"
Direction="Input" ParameterName="@pools_questions_question"
Precision="0" ProviderType="VarChar" Scale="0" Size="0"
SourceColumn="pools_questions_question" SourceColumnNullMapping="False"
SourceVersion="Current">
</Parameter>
<Parameter AllowDbNull="False"
AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input"
ParameterName="@pools_questions_votes" Precision="0" ProviderType="Int"
Scale="0" Size="0" SourceColumn="pools_questions_votes"
SourceColumnNullMapping="False" SourceVersion="Current">
</Parameter>
</Parameters>
</DbCommand>
</InsertCommand>
<SelectCommand>
<DbCommand CommandType="Text" ModifiedByUser="False">
<CommandText>SELECT pools_questions_id, pools_id,
pools_questions_question, pools_questions_votes FROM
dbo.pools_questions2</CommandText>
<Parameters>
</Parameters>
</DbCommand>
</SelectCommand>
<UpdateCommand>
<DbCommand CommandType="Text" ModifiedByUser="False">
<CommandText>UPDATE [dbo].[pools_questions2] SET
[pools_id] = @pools_id, [pools_questions_question] =
@pools_questions_question, [pools_questions_votes] =
@pools_questions_votes WHERE (([pools_questions_id] =
@Original_pools_questions_id) AND ([pools_id] = @Original_pools_id) AND
([pools_questions_question] = @Original_pools_questions_question) AND
([pools_questions_votes] = @Original_pools_questions_votes));
SELECT pools_questions_id, pools_id, pools_questions_question,
pools_questions_votes FROM pools_questions2 WHERE (pools_questions_id =
@pools_questions_id)</CommandText>
<Parameters>
<Parameter AllowDbNull="False"
AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input"
ParameterName="@pools_id" Precision="0" ProviderType="Int" Scale="0"
Size="0" SourceColumn="pools_id" SourceColumnNullMapping="False"
SourceVersion="Current">
</Parameter>
<Parameter AllowDbNull="False"
AutogeneratedName="" DataSourceName="" DbType="AnsiString"
Direction="Input" ParameterName="@pools_questions_question"
Precision="0" ProviderType="VarChar" Scale="0" Size="0"
SourceColumn="pools_questions_question" SourceColumnNullMapping="False"
SourceVersion="Current">
</Parameter>
<Parameter AllowDbNull="False"
AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input"
ParameterName="@pools_questions_votes" Precision="0" ProviderType="Int"
Scale="0" Size="0" SourceColumn="pools_questions_votes"
SourceColumnNullMapping="False" SourceVersion="Current">
</Parameter>
<Parameter AllowDbNull="False"
AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input"
ParameterName="@Original_pools_questions_id" Precision="0"
ProviderType="Int" Scale="0" Size="0" SourceColumn="pools_questions_id"
SourceColumnNullMapping="False" SourceVersion="Original">
</Parameter>
<Parameter AllowDbNull="False"
AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input"
ParameterName="@Original_pools_id" Precision="0" ProviderType="Int"
Scale="0" Size="0" SourceColumn="pools_id"
SourceColumnNullMapping="False" SourceVersion="Original">
</Parameter>
<Parameter AllowDbNull="False"
AutogeneratedName="" DataSourceName="" DbType="AnsiString"
Direction="Input" ParameterName="@Original_pools_questions_question"
Precision="0" ProviderType="VarChar" Scale="0" Size="0"
SourceColumn="pools_questions_question" SourceColumnNullMapping="False"
SourceVersion="Original">
</Parameter>
<Parameter AllowDbNull="False"
AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input"
ParameterName="@Original_pools_questions_votes" Precision="0"
ProviderType="Int" Scale="0" Size="0"
SourceColumn="pools_questions_votes" SourceColumnNullMapping="False"
SourceVersion="Original">
</Parameter>
<Parameter AllowDbNull="False"
AutogeneratedName="pools_questions_id" ColumnName="pools_questions_id"
DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input"
ParameterName="@pools_questions_id" Precision="0" ProviderType="Int"
Scale="0" Size="4" SourceColumn="pools_questions_id"
SourceColumnNullMapping="False" SourceVersion="Current">
</Parameter>
</Parameters>
</DbCommand>
</UpdateCommand>
</DbSource>
</MainSource>
<Mappings>
<Mapping SourceColumn="pools_questions_id"
DataSetColumn="pools_questions_id" />
<Mapping SourceColumn="pools_id" DataSetColumn="pools_id"
/>
<Mapping SourceColumn="pools_questions_question"
DataSetColumn="pools_questions_question" />
<Mapping SourceColumn="pools_questions_votes"
DataSetColumn="pools_questions_votes" />
</Mappings>
<Sources>
</Sources>
</TableAdapter>
</Tables>
<Sources>
</Sources>
</DataSource>
</xs:appinfo>
</xs:annotation>
<xs:element name="DataSet1" msdata:IsDataSet="true"
msdata:UseCurrentLocale="true" msprop:Generator_UserDSName="DataSet1"
msprop:Generator_DataSetName="DataSet1">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="pools2"
msprop:Generator_UserTableName="pools2"
msprop:Generator_RowDeletedName="pools2RowDeleted"
msprop:Generator_TableClassName="pools2DataTable"
msprop:Generator_RowChangedName="pools2RowChanged"
msprop:Generator_RowClassName="pools2Row"
msprop:Generator_RowChangingName="pools2RowChanging"
msprop:Generator_RowEvArgName="pools2RowChangeEvent"
msprop:Generator_RowEvHandlerName="pools2RowChangeEventHandler"
msprop:Generator_TablePropName="pools2"
msprop:Generator_TableVarName="tablepools2"
msprop:Generator_RowDeletingName="pools2RowDeleting">
<xs:complexType>
<xs:sequence>
<xs:element name="pools_id" msdata:ReadOnly="true"
msdata:AutoIncrement="true" msprop:Generator_UserColumnName="pools_id"
msprop:Generator_ColumnPropNameInRow="pools_id"
msprop:Generator_ColumnVarNameInTable="columnpools_id"
msprop:Generator_ColumnPropNameInTable="pools_idColumn" type="xs:int"
/>
<xs:element name="pools_title"
msprop:Generator_UserColumnName="pools_title"
msprop:Generator_ColumnPropNameInRow="pools_title"
msprop:Generator_ColumnVarNameInTable="columnpools_title"
msprop:Generator_ColumnPropNameInTable="pools_titleColumn">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="50" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="pools_questions_question"
msprop:Generator_UserColumnName="pools_questions_question"
msprop:Generator_ColumnPropNameInRow="pools_questions_question"
msprop:Generator_ColumnVarNameInTable="columnpools_questions_question"
msprop:Generator_ColumnPropNameInTable="pools_questions_questionColumn">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="50" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="pools_questions_votes"
msprop:Generator_UserColumnName="pools_questions_votes"
msprop:Generator_ColumnPropNameInRow="pools_questions_votes"
msprop:Generator_ColumnVarNameInTable="columnpools_questions_votes"
msprop:Generator_ColumnPropNameInTable="pools_questions_votesColumn"
type="xs:int" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="pools_questions2"
msprop:Generator_UserTableName="pools_questions2"
msprop:Generator_RowDeletedName="pools_questions2RowDeleted"
msprop:Generator_TableClassName="pools_questions2DataTable"
msprop:Generator_RowChangedName="pools_questions2RowChanged"
msprop:Generator_RowClassName="pools_questions2Row"
msprop:Generator_RowChangingName="pools_questions2RowChanging"
msprop:Generator_RowEvArgName="pools_questions2RowChangeEvent"
msprop:Generator_RowEvHandlerName="pools_questions2RowChangeEventHandler"
msprop:Generator_TablePropName="pools_questions2"
msprop:Generator_TableVarName="tablepools_questions2"
msprop:Generator_RowDeletingName="pools_questions2RowDeleting">
<xs:complexType>
<xs:sequence>
<xs:element name="pools_questions_id"
msdata:ReadOnly="true" msdata:AutoIncrement="true"
msprop:Generator_UserColumnName="pools_questions_id"
msprop:Generator_ColumnPropNameInRow="pools_questions_id"
msprop:Generator_ColumnVarNameInTable="columnpools_questions_id"
msprop:Generator_ColumnPropNameInTable="pools_questions_idColumn"
type="xs:int" />
<xs:element name="pools_id"
msprop:Generator_UserColumnName="pools_id"
msprop:Generator_ColumnPropNameInRow="pools_id"
msprop:Generator_ColumnVarNameInTable="columnpools_id"
msprop:Generator_ColumnPropNameInTable="pools_idColumn" type="xs:int"
/>
<xs:element name="pools_questions_question"
msprop:Generator_UserColumnName="pools_questions_question"
msprop:Generator_ColumnPropNameInRow="pools_questions_question"
msprop:Generator_ColumnVarNameInTable="columnpools_questions_question"
msprop:Generator_ColumnPropNameInTable="pools_questions_questionColumn">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="50" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="pools_questions_votes"
msprop:Generator_UserColumnName="pools_questions_votes"
msprop:Generator_ColumnPropNameInRow="pools_questions_votes"
msprop:Generator_ColumnVarNameInTable="columnpools_questions_votes"
msprop:Generator_ColumnPropNameInTable="pools_questions_votesColumn"
type="xs:int" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
<xs:unique name="Constraint1" msdata
rimaryKey="true">
<xs:selector xpath=".//mstns
ools2" />
<xs:field xpath="mstns
ools_id" />
</xs:unique>
<xs:unique name="pools_questions2_Constraint1"
msdata:ConstraintName="Constraint1" msdata
rimaryKey="true">
<xs:selector xpath=".//mstns
ools_questions2" />
<xs:field xpath="mstns
ools_questions_id" />
</xs:unique>
</xs:element>
<xs:annotation>
<xs:appinfo>
<msdata:Relationship name="FK_pools_questions2_pools2"
msdata
arent="pools2" msdata:child="pools_questions2"
msdata
arentkey="pools_id" msdata:childkey="pools_id"
msprop:Generator_UserRelationName="FK_pools_questions2_pools2"
msprop:Generator_RelationVarName="relationFK_pools_questions2_pools2"
msprop:Generator_UserChildTable="pools_questions2"
msprop:Generator_UserParentTable="pools2"
msprop:Generator_ParentPropName="pools2Row"
msprop:Generator_ChildPropName="Getpools_questions2Rows" />
</xs:appinfo>
</xs:annotation>
</xs:schema>