|  
..:: Support » Forums ::..
Subject: missing results from cursor

You are not authorized to post a reply.   
Prev Next
Author Messages
jspoonUser is Offline
Regular Poster
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...
charliesolomonUser is Offline
Nuke Expert
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
jspoonUser is Offline
Regular Poster
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...
jspoonUser is Offline
Regular Poster
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 :-)
jspoonUser is Offline
Regular Poster
Regular Poster
Posts:11

01/27/2008 7:49 AM Alert 
here are the two queries...

Originally I was getting more fields, so the headings do not match. I was simplifying the query. I am using excel format as output right now.

Attachment: EventParticipationList.txt
Attachment: Beldin_EventParticipation.txt

charliesolomonUser is Offline
Nuke Expert
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.
Forums > DotNetNuke Modules > Pdf Reports > missing results from cursor



ActiveForums 3.6
 Search
RE: EXAMPLE: Avery 5161 labels for your DNN users by charliesolomon
Let me know if this is still an issue... I've given you a membership on this site, with access to th...
RE: Error installing in 4.9 by charliesolomon
I added you as a member on this site, please download the latest version from the Downloads page... ...
RE: Error installing in 4.9 by lafonj
Is the version on Snowcovered the latest version? I just purchased it this weekend and haven't been...
RE: EXAMPLE: Avery 5161 labels for your DNN users by lafonj
Hate to dig up an old thread but here it goes. I ran the example and am now getting this error when...
RE: Error installing in 4.9 by charliesolomon
Hi Doug,Sorry for the delayed reply here... have you downloaded the latest PdfReports zip from this ...
Error installing in 4.9 by ibbly
I have a copy of your software from way back. It is great, but I want to use on my new portal, DN...
RE: EXAMPLE: Filling an AcroForm by charliesolomon
Hi Mike,Order does not matter. Quantity does not matter. Uniqueness does matter (I think... you ma...
RE: EXAMPLE: Filling an AcroForm by mikerennick
If I create an AcroForm with the following form fields (in this order):FirstName, Lastname, FirstNam...
RE: Need to Know what I don't Know by charliesolomon
Unfortunately yes, you're wrong. The fontstyle tag is only read per line... if you put a [br] tag i...
RE: Need to Know what I don't Know by mikerennick
I am selecting some text like this (sub []) in my SP: SELECT '[fontstyle=BOLD]Some text[fontstyle...
Copyright 2006 Beldin Technologies  | Terms of Use | Privacy Statement