vb.net

  • Thread starter Thread starter Paul Vlachou
  • Start date Start date
P

Paul Vlachou

'Newbie'

I am attempting my first uni project which is to write an airline booking
system.

I have created a form with 3 datagrids and filled them successfully using
oledb to an access database (mdb)
I wish to show 3 textboxes on the form whose values are derived by sum
statement on the dbase.

eg:

TB1 = "SELECT SUM(Res_PartySize) from Reservations WHERE Res_Status='C'"
TB2:= Status="Q" TB3=Status="D"

Could somebody please advise how to bind to the textboxes or supply a simiar
working example.

Muchly appreciated

Student, Perth WA
 
If you already have the data you want to do the sum on, you can use compute
method on the data table to get the sums you are looking for. Your code
would look something like this:

Textbox1.Text=DataSet11.Reservations.Compute("SUM(Res_PartySize)",
"Res_Status='C'")

Hope this helps,
Eric
VB.Net team
--------------------
| From: "Paul Vlachou" <[email protected]>
| Subject: vb.net
| Date: Tue, 21 Oct 2003 20:56:45 +0800
|
| 'Newbie'
|
| I am attempting my first uni project which is to write an airline booking
| system.
|
| I have created a form with 3 datagrids and filled them successfully using
| oledb to an access database (mdb)
| I wish to show 3 textboxes on the form whose values are derived by sum
| statement on the dbase.
|
| eg:
|
| TB1 = "SELECT SUM(Res_PartySize) from Reservations WHERE Res_Status='C'"
| TB2:= Status="Q" TB3=Status="D"
|
| Could somebody please advise how to bind to the textboxes or supply a
simiar
| working example.
|
| Muchly appreciated
|
| Student, Perth WA
|
|
|
 
Back
Top