Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 ASP.NET
 Inconsistent Data(CR.NET & SQL2K)

Author  Topic 

BigRetina
Posting Yak Master

144 Posts

Posted - 2003-01-28 : 04:14:59
Salute.
I have the following stored procedure in SQL 2K:

CREATE PROCEDURE TotalBooksPerClass
AS
SELECT b.ClassDesc, a.ClassId,sum(ActualBalance) as TotalShares
FROM Writers a LEFT JOIN Classes b
ON a.ClassId = b.ClassId
Group by a.ClassId , b.ClassDesc

This stored procedure is generating CORRECT results in query analyzer either when run the select statement or by just executing it using (EXEC).
THE PROBLEM IS..when I connect to this stored procedure in CR.NET in VB.NET..it generates WRONG numbers!!!..that simple!!..I can not believe my eyes!.
I opened a new project, added an empty report, connected to the stored procedure using OLEDB and click on the database field that i want and clicked BROWSE FIELD DATA....and what I see..WRONG NUMBERS!..in fact 2 of 8 numbers are wrong!..the others are correct!.
No grouping or anything is done in CR.NET..i just browsed the field data before I even drag and drop the field to the designer!!..
what could be wrong??..

rihardh
Constraint Violating Yak Guru

307 Posts

Posted - 2003-01-28 : 05:02:15
Please provide both resultsets (right and wrong).

There has to be a simple explanation.

Go to Top of Page

BigRetina
Posting Yak Master

144 Posts

Posted - 2003-01-28 : 07:00:39
rihardh..thank U
it seems that i discovered the problem!..front end function that corrupted my data!..I am working on discovering HOW!
(at least i didnt write that function)

Go to Top of Page
   

- Advertisement -