AVERAGE SQL error... help please

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
 
R

Richard K Bethell

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top