barski Posted October 15, 2004 Posted October 15, 2004 I have a "report designer" that I wrote so the users could create reports of their own. When the user selects a what "catalog" they want to use I populate a listbox with the fields pertaining to that "catalog" which in most cases is a view. In order to get the fields I run a "select top 1" query. there has to be a different way to get the fields. Any ideas? I did do a search on the forums but didn't find anything that would help. Quote
Mothra Posted October 15, 2004 Posted October 15, 2004 A "Select Top 1" query is only going to give you one record. I wouldn't think that you would need a list box for only 1 record. Quote Being smarter than you look is always better than looking smarter than you are.
barski Posted October 15, 2004 Author Posted October 15, 2004 this listbox is for field names I could care less about what is stored that's why I don't like using "select top 1" Quote
Mothra Posted October 15, 2004 Posted October 15, 2004 So, your just getting a list of fields that are associated with the selected "catalog"? I would think a simple "Select fields From tblTheFields Where Catalog = [your selected catalog]" would pretty much get the job done. Quote Being smarter than you look is always better than looking smarter than you are.
Diesel Posted October 17, 2004 Posted October 17, 2004 http://www.xtremedotnettalk.com/showthread.php?t=87129 Quote
barski Posted October 18, 2004 Author Posted October 18, 2004 thanks so much! I had given up on this thread Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.