Solved

URGENT - UNION query only returns second dataset to gridview

Posted on 2008-06-18
2
271 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
Comment Utility
can you show the relevant code, please.
0
 

Author Comment

by:dtburdick
Comment Utility
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

728 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now