Skip to main content
12-Amethyst
June 9, 2017
Solved

Displaying Database Tables & Columns list on a mashup

  • June 9, 2017
  • 1 reply
  • 5156 views

I have an MSSqlServer based thing and when creating a new service, selected as SQL Query/Command, the tables/columns tab allows me to include these into my script. How can i get this list of tables and columns from the database on a mashup?

database table and columns.PNG

Best answer by supandey

Hi Andrew, not sure if you already tried this but I think you can simply write a service querying the schema for all it's tables and the columns. As to the script for getting all of that you could check this S/O link

1 reply

supandey5-Regular MemberAnswer
5-Regular Member
June 9, 2017

Hi Andrew, not sure if you already tried this but I think you can simply write a service querying the schema for all it's tables and the columns. As to the script for getting all of that you could check this S/O link

aseaton12-AmethystAuthor
12-Amethyst
June 9, 2017

HI Sushant,

Thanks for reply. Yeah this gives me the set of tables that i require. Now i want to bind this data to a list and then make the list display as a dropdown box. When i do so and configure, the Display field and Value field cannot be selected.

I have given the service a datashape to format  the returned data but this has not helped. I know that when using a grid widget and binding data without a datashape that the 'Show All Columns' checkbox can be selected to correctly display the data in the mashup but there is no such checkbox with the list widget? is there any advice on this?

Thanks

5-Regular Member
June 9, 2017

To confirm if the Datashape is leading to right output I would test that service's output in a Grid just to see what is returned and how it's returned. I've not seen the code but it appears as though the services is likely not returning the result as expected.