Solved

VB.NET Query Builder

Posted on 2002-07-03
9
726 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
Comment Utility
This form is built into VS.Net and cannot be used outside.

CJ
0
 

Author Comment

by:ndroo
Comment Utility
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
Comment Utility
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
 
LVL 23

Accepted Solution

by:
naveenkohli earned 200 total points
Comment Utility
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
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 

Expert Comment

by:joseph_kazzi
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

A basic question.. “What is the Garbage Collector?” The usual answer given back: “Garbage collector is a background thread run by the CLR for freeing up the memory space used by the objects which are no longer used by the program.” I wondered …
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…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

762 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now