6

Can anyone reccomend a free .NET libary which allows you to expose a SQL Query builder to your users in a windows form app? I'd like my users to be able to run relatively straight forward SELECT statements, including some JOINS and other multi-table operations without getting into the real nitty-gritty of SQL.

Thanks, sweeney

Brian Sweeney
  • 6,693
  • 14
  • 54
  • 69
  • Exposing a query builder to your users seems like a bad idea. Are you sure you want to let your users run their own queries? That sounds like it could open up some pretty serious security concerns. – Dan Herbert Jun 17 '09 at 16:55
  • 2
    @Dan As long as you limit the tables a user can connect to and the types of actions run against it (e.g. CONNECT, SELECT only), should be ok, no? – Nick Jun 17 '09 at 17:21
  • Yea well i dont want them running INSERTS or UPDATES or DELETES, or really anything aside from SELECT. Its geared toward a smart but not necessarily technical audience. One of the apps I have in mind geared toward the research community - they'll understand what they are doing and wont have malicious intent. With my other application, if they do somehow manage to wreck the db with a SELECT statement, the data can easily be duplicated. So I dont consider this a problem at all. – Brian Sweeney Jun 17 '09 at 17:29
  • @Nick - right theres no real harm that can come from running select statements right? – Brian Sweeney Jun 17 '09 at 17:29
  • Additionally most DB engines will allow you to specify which tables a user can even look at... – Brian Sweeney Jun 17 '09 at 17:31
  • @sweeney: select * from [User] can be pretty dangerous... – D'Arcy Rittich Sep 11 '09 at 19:38

4 Answers4

4

If you still looking for such component you maybe should take a look at EasyQuery.NET: http://devtools.korzh.com/query-builder-net-winforms/

George
  • 51
  • 1
3

Report Builder is part of SQL Server Reporting Services, and it lets you do all of that and more. You can setup non-MSSQL data sources as well. We have non-developers use it all the time for creating reports with joins, grouping and so on with no SQL code.

The license is included in SQL Server Workgroup and above. I don't know if that's "free" enough for you.

jwmiller5
  • 2,584
  • 1
  • 15
  • 34
  • Can this be deployed without installing the full SQL engine preferably as part of my own application? – Brian Sweeney Jun 17 '09 at 17:38
  • 1
    It installs on top of IIS, and needs to be able to connect to a SQL Server to install its config DB. The IIS server can be on your app server. – jwmiller5 Jun 17 '09 at 17:42
  • Cool this may be an acceptable solution for one of my problems. Thanks! For the other situation I still need something really lightweight, that can be deployed as a DLL or a code library that I can just use. – Brian Sweeney Jun 17 '09 at 18:00
0

You can use Aspose.Report AdHoc.WinForms component (it is not free). It requires no SQL server running, works fine with multiple tables and also have the ability to make automated table join.

Take a look at the component demo on Aspose site.

wandarkaf
  • 1,839
  • 20
  • 30
Pavel
  • 19
  • 3
-1

You can use CodeEngine.Framework classes to select,insert,update,delete operations

Myra
  • 3,646
  • 3
  • 38
  • 47