You can use the DataTable.Select() method to search for the userid in the
datatable if it exists then show error message otherwise insert
another option would be to create a unique index on the userid column
DataTable.Columns["ColumnName"].Unique = true;

Signature
Misbah Arefin
> In ASP.NET 2.0 project, I have added a dataset and have setup the datatable
> and configured the datatableadapter (using the wizards).
[quoted text clipped - 7 lines]
>
> Thanks,
Misbah Arefin - 15 Feb 2008 22:32 GMT
sorry to RE: on my own post but if your original intent was that the dattable
is empty and you are inserting a new row and wanted to check it against the
db rows then you would have to execute some SP which would seach the db table
for that value and return a scalar value indicating if the data exists or not

Signature
Misbah Arefin
> You can use the DataTable.Select() method to search for the userid in the
> datatable if it exists then show error message otherwise insert
[quoted text clipped - 12 lines]
> >
> > Thanks,