There's a lot that could be fixed with that code but first things first, do those GetUserNames and GetPassword methods actually return a String or does it return a DataTable? I suspect the latter and that's backed up by the error message but your code suggests the former.