-
Need to do an aspdb presentation of it's capabilities but .....
Error message: Error # (do_Aggregate) = 80040E07(-2147217913)
Description = [Microsoft][ODBC SQL Server Driver][SQL Server]The sum or average aggregate operation cannot take a char data type as an argument.
Source = Microsoft OLE DB Provider for ODBC Drivers
SQL State = 22005
Native Error = 409
__________________________________________
Here is my code. What's the problem?
<HTML>
<HEAD><TITLE>Test Page</TITLE></HEAD>
<BODY BGColor=#e0e0e0>
<%
Set Mydb=Server.CreateObject("ASP.db"
Mydb.dbUnit = 2004
Mydb.dbDSN = "SQL"
Mydb.dbSQL = "Select OrderNumber,Description,UnitPrice,LinePrice From dbo.Promis_Data"
Mydb.dbMode = "Grid"
Mydb.dbColor = "White,Black,Silver,Black"
Mydb.dbDBType = "SQL"
Mydb.dbGridInc = 5
Mydb.dbGridTableTag = "Border=3"
Mydb.dbMagicCell = "3,bgcolor=pink align=right,format=[currency];"
Mydb.dbAggSQL="SELECT sum(LinePrice) FROM dbo.Promis_Data"
Mydb.dbAggMagicCell="0,bgcolor=yellow,<B>forma t=[currency]</B>;"
s = zAggName & ",<B>Total LinePrice (all records)</B>"
Mydb.dbUserLocalText=s
Mydb.dbAggNameTag="ColSPAN=3 align=right"
Mydb.ASPdb
%>
</BODY>
</HTML>
-
Need to do an aspdb presentation of it's capabilities but ..... (reply)
That is the error message that SQL Server gives when you try to take the sum of a text field. It sounds like LinePrice is a text (char) field but you have assumed it is a numeric field. Can you change it to be a numeric field in SQL Server? Only numeric fields can be summed.
Mark.
------------
Frustrated at 4/12/01 12:03:33 PM
Error message: Error # (do_Aggregate) = 80040E07(-2147217913)
Description = [Microsoft][ODBC SQL Server Driver][SQL Server]The sum or average aggregate operation cannot take a char data type as an argument.
Source = Microsoft OLE DB Provider for ODBC Drivers
SQL State = 22005
Native Error = 409
__________________________________________
Here is my code. What's the problem?
<HTML>
<HEAD><TITLE>Test Page</TITLE></HEAD>
<BODY BGColor=#e0e0e0>
<%
Set Mydb=Server.CreateObject("ASP.db"
Mydb.dbUnit = 2004
Mydb.dbDSN = "SQL"
Mydb.dbSQL = "Select OrderNumber,Description,UnitPrice,LinePrice From dbo.Promis_Data"
Mydb.dbMode = "Grid"
Mydb.dbColor = "White,Black,Silver,Black"
Mydb.dbDBType = "SQL"
Mydb.dbGridInc = 5
Mydb.dbGridTableTag = "Border=3"
Mydb.dbMagicCell = "3,bgcolor=pink align=right,format=[currency];"
Mydb.dbAggSQL="SELECT sum(LinePrice) FROM dbo.Promis_Data"
Mydb.dbAggMagicCell="0,bgcolor=yellow,<B>forma t=[currency]</B>;"
s = zAggName & ",<B>Total LinePrice (all records)</B>"
Mydb.dbUserLocalText=s
Mydb.dbAggNameTag="ColSPAN=3 align=right"
Mydb.ASPdb
%>
</BODY>
</HTML>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|