Solved

VB.NET Query Builder

Posted on 2002-07-03
9
734 Views
Last Modified: 2008-03-06
Is there any way I can open the Query Builder (the one which we get when we build CommandText) from code? I need to call up the Query Builder when user clicks a button on my form. Please help.
0
Comment
Question by:ndroo
  • 3
  • 2
  • 2
  • +2
9 Comments
 
LVL 22

Expert Comment

by:CJ_S
ID: 7126405
This form is built into VS.Net and cannot be used outside.

CJ
0
 

Author Comment

by:ndroo
ID: 7126708
I actually want to create a property which allows creation of SQL command during development time. Just like the CommandText property. However, I need some easier way to create the SQL commands, instead of typing them manually. Any idea?
0
 
LVL 22

Expert Comment

by:CJ_S
ID: 7126731
So, while developing you want an easy way to create SQL queries? Then the Query Builder would do, won't it? I'm confused as to what you want to do.

Do you want the enduser to click a button and create his / her own queries using a form or do you want an easy way during development?

CJ
0
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
LVL 23

Accepted Solution

by:
naveenkohli earned 200 total points
ID: 7127516
For run time creation of SQL Queries, you will have to build your component or something or buy a third party control.
The idea is pretty simple. You can call GetSchemaTable on your table. It will return a DataTable containing complete schema. Then you can process this table to build some kind of UI control displaying all the fields. Users can pick and choose the fields that they want to search on.

If your table is simple, then you should be able to come up with some component pretty quickly.

Naveen
0
 

Expert Comment

by:joseph_kazzi
ID: 7131165
You can use Microsoft English Query, which is built-in SQL Server to let your end-user build his/her own query by using plain english, where the english query engine will transfer the english statement to a "SELECT" statement. Be carefull the english query needs lot of knowledge in the english grammer.
0
 

Author Comment

by:ndroo
ID: 7131257
joseph_kazzi
Sorry I better rephrase my question. I actually want to create a property (eg. SQLSelect) and be able to click (at the property list) a button and activate the query builder during design time. It's not for runtime execution.

0
 
LVL 20

Expert Comment

by:Silvers5
ID: 7131468
And you want it at design time.. naveen proposed a good workaround..
Joseph proposed another one a bit tougher for end user..
0
 
LVL 20

Expert Comment

by:Silvers5
ID: 7131482
And you want it at design time.. naveen proposed a good workaround..
Joseph proposed another one a bit tougher for end user..
0
 

Author Comment

by:ndroo
ID: 7131503
Well, looks like we're going in circles huh? I do argee that naveen's suggestion is more accurate (though I probably have to crack my head trying to do the UI). So thanks.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question