Solved

URGENT - UNION query only returns second dataset to gridview

Posted on 2008-06-18
2
273 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 142

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

772 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