Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

URGENT - UNION query only returns second dataset to gridview

Posted on 2008-06-18
2
Medium Priority
?
279 Views
Last Modified: 2010-05-18
This is urgent.

I have a UNION query and my gridview is only returning the second query from the SQL statement.  I know the queries both return data because when I reverse the SQL Statements the other result set is shown.

The query is run via stored procedure so I'm not even sure how .NET knows, but it does.
0
Comment
Question by:dtburdick
2 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 2000 total points
ID: 21817198
can you show the relevant code, please.
0
 

Author Comment

by:dtburdick
ID: 21817306
My mistake, it's really screwy because I'm generating the SQL on the fly.  It wasn't a bug with my .NET code, it was a bug in my T-SQL where I was resetting the SQL string for each query.

I thought it was a problem with the dataset having two tables or something.

Cut and Paste can kill sometimes.

Thanks.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Integration Management Part 2
Suggested Courses
Course of the Month11 days, 20 hours left to enroll

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question