R
roger beniot
I have an MS Access database that contains one table with the
following information:
Date
Gallons
Mileage
I created an ASP.NET web appliation that can access the table via
ADO.NET (using oleDB controls) so I can display the info in a web page
using a DataGrid control.... Currently I have this working w/ no
problems.
The next thing I would like to do is add another column to the
DataGrid and calculcate the miles per gallon (MPG)... So my questions
are:
1) is it better to do the calculation in the database (ie. have a
field in the database for this) or should I calculate the value in the
Web app's code behind when it is initializing the DataGrid?
2) how can I calculate the fields value using Access? It doesn't seem
possible in Access to calculate values via formulas like it is in
Excel.
3) If I calculate the value in the web app, how do I populate the
value into the DataGrid?
#1, it would seem better to already have the value calculated in the
database ahead of time so the web app can load faster (w/out having to
do the calculations)... but as #2 shows I'm unable to figure out how
to calculate/populate the field in Access (I realize this is a
question for another group... but if anyone has an answer I'd
appreciate it).
Thanks in advance,
roger
following information:
Date
Gallons
Mileage
I created an ASP.NET web appliation that can access the table via
ADO.NET (using oleDB controls) so I can display the info in a web page
using a DataGrid control.... Currently I have this working w/ no
problems.
The next thing I would like to do is add another column to the
DataGrid and calculcate the miles per gallon (MPG)... So my questions
are:
1) is it better to do the calculation in the database (ie. have a
field in the database for this) or should I calculate the value in the
Web app's code behind when it is initializing the DataGrid?
2) how can I calculate the fields value using Access? It doesn't seem
possible in Access to calculate values via formulas like it is in
Excel.
3) If I calculate the value in the web app, how do I populate the
value into the DataGrid?
#1, it would seem better to already have the value calculated in the
database ahead of time so the web app can load faster (w/out having to
do the calculations)... but as #2 shows I'm unable to figure out how
to calculate/populate the field in Access (I realize this is a
question for another group... but if anyone has an answer I'd
appreciate it).
Thanks in advance,
roger