Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Troubleshooting
Research
Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

ASP.NET Ad Hoc Query with MS SQL Server

Avatar of jumpseatnews
jumpseatnews asked on
ASP.NET
2 Comments1 Solution238 ViewsLast Modified:
Hi Folks,

I have a MS SQL Database with employee information:

EmployeeNumber
FirstName
LastName
DateHired
Address
Phone
Email
etc...

I currently have an ASP.NET 2.0 page that displays a Gridview with a hard-coded query.  I then allow the visitor to download the results in an Excel file.

My Question: How can I make the query dynamic based on checkboxes and user action?

In other words, I want to:

1.) Ask the visitor to select from a group of checkboxes what columns in the database to include in the query. (these don't need to be generated from the database)

Then...

2.) Ask the visitor to select the parameters (such as specific date hired, or specific last name, etc.) to filter down the results.

Then...

3.) Execute the SQL query (using VB.NET) to obtain the results that can be displayed in a gridview.

I'm stuck on how to do this in VB.NET.  Any info would be appreciated.

Thanks,

Christopher

ASKER CERTIFIED SOLUTION
Avatar of asp_lha
asp_lha

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Commented:
This problem has been solved!
Unlock 1 Answer and 2 Comments.
See Answers