How do I use a form and retrieve the data for select * (I can retreive, just not use in Select * )

Results 1 to 3 of 3

Thread: How do I use a form and retrieve the data for select * (I can retreive, just not use in Select * )

  1. #1
    Brandon Monahan Guest

    Default How do I use a form and retrieve the data for select * (I can retreive, just not use in Select * )

    I have made a form for user imput so they can choose what they want to search. What I need is for the word they type in to be part of my SELECT * from table where ColumnName = &#039SearchWordHere&#039". I have used the following to retrieve the data to type: <BR>Dim SearchText<BR>SearchText = CStr(Request("search"))<BR>Response.Write(SearchTe xt)<BR>But I need it for the search. I would appreciate any help on this. Also, maybe suggestions on another way to build a search. I need a rather complicated search in the end with 3 sets of variales. Please respond to bmonahan@stanleyworks.com.<BR><BR>Brandon

  2. #2
    Joseph Hatcher Guest

    Default RE: How do I use a form and retrieve the data for select * (I can retreive, just not use in Select *

    Try looking at http://4guysfromrolla.com/webtech/051999-3.shtml<BR><BR>Dim SearchText<BR>SearchText=CStr(Request("search"))<B R>strSQL= "SELECT * FROM table WHERE ColumnName=&#039"&search&"&#039 "<BR><BR>The following works for VBScript on the Server Side<BR>If the variable is a string use &#039"&variable_name&"&#039<BR>if the variable is a number use "&variable_name&"<BR>

  3. #3
    Join Date
    Dec 1969
    Posts
    1,019

    Default RE: How do I use a form and retrieve the data for select * (I can retreive, just not use in Select *

    Try:<BR>SELECT * from table where ColumnName=&#039" & SearchText & &#039"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •