Solved

VB.NET Query Builder

Posted on 2002-07-03
9
731 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
 
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
DevOps Toolchain Recommendations

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

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

920 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

16 Experts available now in Live!

Get 1:1 Help Now