Link to home
Start Free TrialLog in
Avatar of jumpseatnews
jumpseatnews

asked on

ASP.NET Ad Hoc Query with MS SQL Server

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

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jumpseatnews
jumpseatnews

ASKER

Great, this is a big help, thanks!

Chris