2
Answers

How to pull integers out of tableAdapter into a variable and how to count Bools to insert into another column

Todd Vance

Todd Vance

16y
3.8k
1

 

This should be simple, I just cannot find out the answers easily.  At work I have 9 Aircards.  I am responsible for checking them out and keeping track of them.

 

I wanted to make a simple C# application with a Express database. 

 

2 Tables -

 

one is the Usage table (  totalCards, cardsCheckedOut, Date, peopleTurnedAway)

 

one is the Card table  (cardName (#1, #2, etc.), checkedOut bool, userName, datesNeeded)

 

OKAY - TWO THINGS  --- 

 

HOW do I pull integers such as totalCards, cardsCheckedOut from my TableAdapter and plop them into a variable so that I can perform calculations on my form?

** I want to have simple calcs. like CardsAvail%, Usage% etc.  

 

AND HOW can I FILL the Column cardsCheckedOut in the Usage table by Adding up the total of the checkedOut bool Column in the Card table?

 

These seem like simple things, but have not been able to find the answers....help?

Answers (2)