How to Programmatically Obtain Data from SQL Source

D

D Myers

I have a data connection to SQL source that I want to use to populate a
Bulletted List. Two problems exist: 1) I need to parse the data to remove
duplicate entries, and 2) I need to expand my Bulletted List with each item
added from the parsed data. So, how do I do this all programmatically?
 
A

Adam Harding

D Myers

Non-programatically i can do it in a repeating table.

Specify a repeating table with the datafields you want give the users a
button to pull back the data as well, even filter it using queryfields.

Now go into the properties of the repeating table and specify to populate
the table with the results of a query in SQL. Design the query in SQL to
filter out duplicates and that sorts it.

Hope this hleps

Adam
 
D

D Myers

Thank you, Adam.

Here is the query I am using for the Data Connection: select
"BugID","ProductReleaseName" from "dbo"."Report_Mitigations_Workarounds" as
"Report_Mitigations_Workarounds" I append "Where 'BugID' = 'ID' using the
queryAdapter in the code to get the specific entries I am seeking. Next, I
need to remove the duplicate ProductReleaseName results. I am somewhat of a
novice, so any hints regarding the query would be appreciated.

I have also setup a Bulleted List called Software. I have set the default
value to @ProductReleaseName[@BugID = ID]. The list contains only the first
item returned. It also does not expand. (This same problem exists without
using a repeating element. For example, I only see the first item in a text
box.) Again, any help here would be greatly appreciated.
 
A

Adam Harding

Hi

Are you familiar with the Select DISTINCT function if not have a look at

www.1keydata.com/sql/sqldistinct.html

This returns only non-duplicate entries on one or more columns in your table.

As to your other problem, the bulleted list will never work since it does
not "repeat" a text box on its own cannot repeat either, add a repeating
section or table and that should work.
If it does not then yo uneed to check that your data source is set up
correctly to repeat.

Cheers Adam

D Myers said:
Thank you, Adam.

Here is the query I am using for the Data Connection: select
"BugID","ProductReleaseName" from "dbo"."Report_Mitigations_Workarounds" as
"Report_Mitigations_Workarounds" I append "Where 'BugID' = 'ID' using the
queryAdapter in the code to get the specific entries I am seeking. Next, I
need to remove the duplicate ProductReleaseName results. I am somewhat of a
novice, so any hints regarding the query would be appreciated.

I have also setup a Bulleted List called Software. I have set the default
value to @ProductReleaseName[@BugID = ID]. The list contains only the first
item returned. It also does not expand. (This same problem exists without
using a repeating element. For example, I only see the first item in a text
box.) Again, any help here would be greatly appreciated.

Adam Harding said:
D Myers

Non-programatically i can do it in a repeating table.

Specify a repeating table with the datafields you want give the users a
button to pull back the data as well, even filter it using queryfields.

Now go into the properties of the repeating table and specify to populate
the table with the results of a query in SQL. Design the query in SQL to
filter out duplicates and that sorts it.

Hope this hleps

Adam
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top