Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. SQL query builder from an App

SQL query builder from an App

Scheduled Pinned Locked Moved Database
databasecsharptoolsquestion
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    Leyu
    wrote on last edited by
    #1

    We have an app made in C# which promtes users for a sql query at run time, this has become difficult for the users but we were thinking of an easy to use query builder to integrate & instead of writing from scratch we were were wondering if there were available tools to use ??

    L 1 Reply Last reply
    0
    • L Leyu

      We have an app made in C# which promtes users for a sql query at run time, this has become difficult for the users but we were thinking of an easy to use query builder to integrate & instead of writing from scratch we were were wondering if there were available tools to use ??

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      I do not know of a query-builder per se, but at one time we had to generate reports where the functionality would be similar to what you want to do. But like you said, it is difficult for users to write full blown queries, and not only that but you could also run into security problems... The solution we came up was using templates (SQL Server 2000)...where we had multiple queries defined and users would click on the the most appropriate report type, enter some parameters and bingo, get a report back. A template might look like this: 0000> Select CustomerName 'name' From dbo.Customer where gender = @fieldid for xml raw This would return the data in xml format (dat as root) - which can be routed through xslt to output nicely formatted result (text/html etc). This is just an idea - I am sure there are other options out there. This worked well for us as we had more control over every aspect and we could add more "reports" as needed by users. Let me know if you want to pursue this option and I'll point you into the right direction.

      L 1 Reply Last reply
      0
      • L Lost User

        I do not know of a query-builder per se, but at one time we had to generate reports where the functionality would be similar to what you want to do. But like you said, it is difficult for users to write full blown queries, and not only that but you could also run into security problems... The solution we came up was using templates (SQL Server 2000)...where we had multiple queries defined and users would click on the the most appropriate report type, enter some parameters and bingo, get a report back. A template might look like this: 0000> Select CustomerName 'name' From dbo.Customer where gender = @fieldid for xml raw This would return the data in xml format (dat as root) - which can be routed through xslt to output nicely formatted result (text/html etc). This is just an idea - I am sure there are other options out there. This worked well for us as we had more control over every aspect and we could add more "reports" as needed by users. Let me know if you want to pursue this option and I'll point you into the right direction.

        L Offline
        L Offline
        Leyu
        wrote on last edited by
        #3

        what do u about SQL-DMO is there any possibility to use the functionality?

        L 1 Reply Last reply
        0
        • L Leyu

          what do u about SQL-DMO is there any possibility to use the functionality?

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          Sorry, never used it.

          ...think concepts, teach to learn...

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups