0

I am new to C# and currently using VS2010. When I try to do this:

UserDetailsTableAdapters.UserDetailsTableAdapter userDetails = new UserDetailsTableAdapters.UserDetailsTableAdapter();
UserDetails.UserDetailsDataTable loginDetailsTable = userDetails.GetData();
UserDetails.UserDetailsDataRow dataRow = null;

I get this error

"The type name 'UserDetailsDataRow' doesn't exist in the type 'UserDetails'"

I have included the using System.Data; Any ideas what might be causing this issue and how to resolve it ?

Edit: UserDetails is a data set. I have a Table Adapter to an Access Database file. What I am trying to accomplish is to go through the set of existing users and at a later stage compare one of the values to check if it already exists. My idea was to get the row and compare one of the columns with a local variable for matches.

Phantomazi
  • 408
  • 6
  • 22
  • Can you explain more what is `UserDetails` what is the thing you are thing to accomplish here – Yaser Jaradeh Apr 25 '15 at 16:39
  • @Phantomazi Why do you think that `UserDetails` type contains `UserDetailsDataRow` type? Or that it has something to do with `System.Data` namespace? Both those types are your user defined types(there are no such types in the framework, at least as I know), so the problem is that your code(or some third-party code you use) doesn't contain `UserDetails` with nested `UserDetailsDataRow` type. – Eugene Podskal Apr 25 '15 at 16:41
  • @EugenePodskal I thought so because I am following a tutorial and there this worked. Sorry, as I said I am a beginner taking my first steps – Phantomazi Apr 25 '15 at 16:49
  • Then you probably forgot to add definition of `UserDetailsDataRow` to your `UserDetails` class. Try to recheck the tutorial once more. – Eugene Podskal Apr 25 '15 at 16:51
  • what makes you think that this data set contains this property `UserDetailsDataRow` i think you need to rethink the technique of your work – Yaser Jaradeh Apr 25 '15 at 16:57

0 Answers0