Zum Hauptinhalt gehen

Selected fields in listbox to SQL Query

Kommentare

2 Kommentare

  • Permanently deleted user

    If I understand what you want to achieve correctly, it is not possible to make it work using the Geocortex Essentials (GE) Workflow Default Database activity (SQL Query) since the parameter you set is only for WHERE clause, not SELECT clause to prevent the SQL Injection.

    You want to construct this kind of SQL statement, right? "SELECT [dynamic Field Names] FROM aTable" where [dynamic Field Names] are chosen by a user on the UI Form (ListBox).

    You can achieve this using your own custom CodeActivity where take the Sql statement (dynamic), and connect DB, and query, and return the result to the workflow. However, becareful to avoid SQL insection.

    0
  • Permanently deleted user

    Thanks for the reply.  Yes that's exactly what I was thinking.  Just to be clear, from what you mentioned below I would need to somehow loop through the field names that are selected to come up with dynamic SELECT/WHERE strings, run the SQL statement with the dynamic strings inserted, and return the results?  It's the looping part that I'm not entirely familiar with yet.

    0

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.