Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

VB.NET Query Builder

Posted on 2002-07-03
9
Medium Priority
?
739 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
Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

 
LVL 23

Accepted Solution

by:
naveenkohli earned 600 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:Michel Sakr
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:Michel Sakr
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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Suggested Courses

926 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