You are not authorized to post a reply.
|
Prev Next
|
| Author |
Messages |
|
jspoon
 Regular Poster Posts:11
 |
| 01/24/2008 7:42 PM |
Alert
|
I have found a situation where when I do a select EventID,UserID,Rider from aTable, I get more results than when I do: declare curPropSel cursor for select EventID,UserID,Rider from aTable fetch curPropSel into @EventID,@curUserID,@Role while @@fetch_status = 0 begin select @EventID,@curUserID,@Role fetch curPropSel into @EventID,@curUserID,@Role end /* while fetch ok */ close curPropSel deallocate curPropSel I get fewer entries... |
|
|
|
|
charliesolomon
 Nuke Expert Posts:50

 |
| 01/24/2008 11:03 PM |
Alert
|
| Really? That's surprising... I'd like to see those results. I've not heard of this before, could null data be causing it? Can you produce this result in Query Analyzer or Management Studio? |
|
Charlie Solomon Beldin Technologies |
|
|
jspoon
 Regular Poster Posts:11
 |
| 01/25/2008 4:10 PM |
Alert
|
| I created a sql query in Management Studio and got 15 entries for my first eventID. When I copy/paste that same query before tblprops table select and only get 10 for the first eventID. I can send you the SQL file and my Beldin report file if that will help. i am using the excel spreadsheet as output since it is easier than PDF where you have to worry more about the tblprops table... |
|
|
|
|
jspoon
 Regular Poster Posts:11
 |
| 01/25/2008 4:22 PM |
Alert
|
| sorry, should have said when I copy/past that same query BELOW the tblprops definition and select. You probably knew what i meant :-) |
|
|
|
|
jspoon
 Regular Poster Posts:11
 |
|
charliesolomon
 Nuke Expert Posts:50

 |
| 02/04/2008 11:07 AM |
Alert
|
I wonder if there is an issue with the .Net DataReader skipping entries when it reads through them. I have seen data ordering issues before related to this... is @EventID unique in your result set? If not...
I would try selecting your result set into a temp table and returning an index with it, like this:
declare @t table (@myKey int identity, @EventID int, @userID int, @role int)
insert into @t (EventID, userID, RoleID) select EventID, userID, Rider from CTHOGEventParticipation
...then return the recordset: select myKey, EventID, userID, RoleID from @t order by myKey |
|
Charlie Solomon Beldin Technologies |
|
|
|
| You are not authorized to post a reply. |
|
|
|
ActiveForums 3.6
|
|
|
|
|