none
Any idea how to limit row numbers? RRS feed

  • Question

  • Hi, I am writing an application for sport coaches. I wish to limit the number of players that can be added in some versions. Does anyone have any idea how to limit row numbers in a table to achieve this? I must admit that I am not even sure where to start on this one! I am using VB & SQL Express 2005. I have the data entered in fields on my form rather than in a datagrid view.

    Thanks from a beginner!
    Tuesday, February 6, 2007 4:20 PM

Answers

  • Well, one scenerio would be to have a table of coaches and a field called player count, and a field called MaxPlayers...any time that coach added or deleted a player from the team you would add or subtract to player count....if that coach reached his max then you send a message telling him he already has max players and must delete before adding another
    Tuesday, February 6, 2007 5:25 PM
    Moderator

All replies

  • Well, one scenerio would be to have a table of coaches and a field called player count, and a field called MaxPlayers...any time that coach added or deleted a player from the team you would add or subtract to player count....if that coach reached his max then you send a message telling him he already has max players and must delete before adding another
    Tuesday, February 6, 2007 5:25 PM
    Moderator
  • I actually endde up doing something like this, but hard coded the count and the delete. It works even though in places I am not quite sure why!!!

    Thanks for your help
    Friday, February 9, 2007 5:39 PM