How to embed an attribute in a DataRow?
<p>I am doing my project, in which I have a database of books. I have loaded that database in DataTable "Books". There is another DataTable "Watermark_books", which contains all attribute as "Books" datatable has, as well as an extra attribute which is watermark of each row. 
I have to calculated watermark, now I have to embed that watermark attribute in "Watermark_books" datatable. </p>

<p>Kindly have a look on code which i have written. </p>

<pre><code>int ky= 0;

double attrib = CalculateWatermarkAttribute(i, j, out ky);

DataRow dataRow = dataSet.Tables["Watermark_Books"].NewRow();

DataRow tmpRow = dataSet.Tables["Books"].Select("id=" + ky)[0];

dataRow.ItemArray = tmpRow.ItemArray; // this copies all columns of one row to new row

dataRow.ItemArray[7] = attrib; // this line of code is not working

dataSet.Tables["Watermark_Books"].Rows.Add(dataRow);
</code></pre>

<p>Can anyone point out what is wrong with above mentioned line of code....</p>

<p>Thanks in advance...</p>
