I have two tables in a database - Clubs and Players. Each Club consists of 25 players. So a virtual table ClubsPlayers is created.

I would like to access this tables row or cell, but I don't know how.

As you can access real tables like this:

6 Years
Discussion Span
Last Post by thines01

When I included the database into my c# project, it automatically created the table in dataset. But I can't find it always, but only when clubsTableAdapter and playersTableAdapter are included on the same form. (sorry about not giving that info)


Ah, OK.
Now, I have to ask: Do you REALLY need to access it?

Also, if you know what name it will be when it is created, can you just create a Connection, Command, Reader, etc for it and only call it once it is created?

Votes + Comments
Made me think a bit further :D

Oh shoot... Thank you! Player has the field with which it is connected with a club, so I can check the ID of it... Yea that's right!

But do you think it would be a problem to go through the whole database everytime I want to access a certain player of a certain club? (it has only 250 records)

Edited by niggz: n/a


Since the database is small, you can just load the entire thing into memory then search.
You can do a join on the tables and map them to a class in C# and just load it with one query.

Once it is memory, you can search it however you like without more database hits.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.