?
Solved

URGENT - UNION query only returns second dataset to gridview

Posted on 2008-06-18
2
Medium Priority
?
278 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Give Your Engineering Team a Productivity Boost

Learn why container technology is so powerful and how it can provide your team with productivity gains and other benefits.

Question has a verified solution.

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

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
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…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

719 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