AVERAGE SQL error... help please

  • Thread starter Thread starter Steven
  • Start date Start date
S

Steven

Hi. I have the following sql statement:
SELECT AVG(grade) FROM tblEvalGrades WHERE SSN='123456789'

I get the following error when trying to output my table
in my datagrid:
ERROR: Decimal byte array constructor requires an array
of length four containing valid decimal bytes

I am using Access as my database with ASP.Net c#. This
error is an access error though.

The grades that I have are GPAs. I am using an Access
database, and the field grade is Precision 4, Scale 2,
and Decimal Places 2. Could someone tell me what I need
to do to get rid of the error. Thank you in advance.

Steven
 
Steven said:
Hi. I have the following sql statement:
SELECT AVG(grade) FROM tblEvalGrades WHERE SSN='123456789'

I get the following error when trying to output my table
in my datagrid:
ERROR: Decimal byte array constructor requires an array
of length four containing valid decimal bytes

Not sure what it is you are trying to do here, but this query will only
return you a single result - an average of whatever that field is, without
a column name. A grid is typically used for showing a list of results, not a
single unlabeled number.

R.
 
Back
Top