Solved

I need to know how to return a dataset from a DB from given a variable paramiter.

Posted on 2004-09-09
2
186 Views
Last Modified: 2010-04-17
I am using asp.vb in Microsofts Visual Web Developer 2005 Express Edition Beta to make a web site.  I have figured out how to graphically put an "SqlDataSource" object on the page and then "Bind" it to various data grids.  The thing works great for returing all the values from my spesified values.  Now I need it to return data based on a text box entry and the click of a button.  I have added my button and my textbox to the page - But I can't figure out how to make the query look at whats in the text box for a parameter then procede to present the results.  I have a basic understanding of ASP.Net (very basic) and of logical syntax.  I can provide further information if it will help.  I just need a little guidance.  Also, for a web application, is this a reasonable way to set up a search for data?  I made the question 500 pts because I think I will need some detail in the answer.  

Thank you,  

-TH
0
Comment
Question by:travishaberman
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 57

Accepted Solution

by:
Julian Hansen earned 500 total points
ID: 12024670
You need to include some VBScript on the page itself to trap the buttons onclick event.

It's been a while since I did this stuff so my syntax may be a bit off but here is the gist of it.

<intpu type=text  ID="txtQuery" ...>
<input type=button value="click me" onclick="fnSetQuery" ID=button1 ...>

Now you need to create the function

Sub fnSetQuery ()

   myform.mysqlconn.Query = txtQuery.text
   ....
' Do the rest of your data stuff here
end sub
0
 

Author Comment

by:travishaberman
ID: 12029724
Thanks for the help.. !  I actually took your bit here and found a toutorial online that showed me step by step as well..
0

Featured Post

Transaction Monitoring Vs. Real User Monitoring

Synthetic Transaction Monitoring Vs. Real User Monitoring: When To Use Each Approach? In this article, we will discuss two major monitoring approaches: Synthetic Transaction and Real User Monitoring.

Question has a verified solution.

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

Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Simple Linear Regression

729 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