ASP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingASP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #31  
Old October 27th, 2009, 03:20 AM
micky's Avatar
micky micky is offline
Couch Potato Wizard
Click here for more information. Click here for more information
 
Join Date: Jan 2005
Location: India
Posts: 12,259 micky User rank is General 18th Grade (Above 100000 Reputation Level)micky User rank is General 18th Grade (Above 100000 Reputation Level)micky User rank is General 18th Grade (Above 100000 Reputation Level)micky User rank is General 18th Grade (Above 100000 Reputation Level)micky User rank is General 18th Grade (Above 100000 Reputation Level)micky User rank is General 18th Grade (Above 100000 Reputation Level)micky User rank is General 18th Grade (Above 100000 Reputation Level)micky User rank is General 18th Grade (Above 100000 Reputation Level)micky User rank is General 18th Grade (Above 100000 Reputation Level)micky User rank is General 18th Grade (Above 100000 Reputation Level)micky User rank is General 18th Grade (Above 100000 Reputation Level)micky User rank is General 18th Grade (Above 100000 Reputation Level)micky User rank is General 18th Grade (Above 100000 Reputation Level)micky User rank is General 18th Grade (Above 100000 Reputation Level)micky User rank is General 18th Grade (Above 100000 Reputation Level)micky User rank is General 18th Grade (Above 100000 Reputation Level)  Folding Points: 1480 Folding Title: Novice Folder
Time spent in forums: 5 Months 4 Days 2 m 48 sec
Reputation Power: 2179
Your query looks fine to me.
What happens when you run this query in your database's query runner??

Also, i just realized that Access uses * as wildcard in Like rather than %
But i am not too sure about Access version.

Have a look at this link and see if it makes any sense.
http://msdn.microsoft.com/en-us/lib...fice.10%29.aspx

Other links that might help

http://www.techonthenet.com/access/queries/like.php

http://articles.techrepublic.com.co...11-6154704.html
__________________
Laziness is my religion and Sunday is my God

Get the Mantra!

Reply With Quote
  #32  
Old October 27th, 2009, 08:48 AM
sync_or_swim's Avatar
sync_or_swim sync_or_swim is offline
Moderator
Click here for more information.
 
Join Date: Mar 2006
Location: South Wales
Posts: 3,461 sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level) 
Time spent in forums: 2 Months 1 Day 16 h 50 m 26 sec
Reputation Power: 1806
--> Moved to ASP Forum, I think you will get a better response here.

Firstly, I would recommend that you pass the values in the Form collection instead of the querystring, use the POST method instead of GET. Also, I cannot see where you are assigning your Request values to the variables.

Finally, I would be inclined to only append the conditions to the query if the user has entered a keyword that way you wouldn't have to get the user to enter a wildcard, try something like this:
Code:
<!--Heres the form-->

<form action="<%= strURL %>" method="post">
<input name="search" value="<%= strSearch %>" />
<p>

<p><B>Enter a second key word you want to search for or % in the text box below</B></p>  
<p></p>

<input name="search1" value="<%= strSearch1 %>" />
<p>


<p><B>Enter a third key word you want to search for or % in the text box below</B></p>  
<p></p>

<input name="search2" value="<%= strSearch2 %>" />
<p>


<input type="submit" />
</p>
</form>
<p></p>

Then your sql would look like:
Code:
sql = "SELECT * FROM [RSA_Candidates] WHERE 1 = 1 " 

If Len(Trim(Request.Form("strSearch"))) > 0 Then sql = sql & "AND resume_doc LIKE '%"& Replace(Request.Form("strSearch"), "'", "''") & "%' "
If Len(Trim(Request.Form("strSearch1"))) > 0 Then sql = sql & "AND resume_doc LIKE '%"& Replace(Request.Form("strSearch1"), "'", "''") & "%' "
If Len(Trim(Request.Form("strSearch2"))) > 0 Then sql = sql & "AND resume_doc LIKE '%"& Replace(Request.Form("strSearch2"), "'", "''") & "%' "

sql = sql & " ORDER BY lastname;"

With regards displaying the details, there is a known issue whereby you can only display the contents of your memo field once, I recommend that you assign the value to a variable, you can then display this whenever you want:
Code:
If rs.EOF <> True Then
	Response.Write("<table border=1 cellspacing=2><tr><td colspan=""2"">Results:</td></tr>")
	While NOT rs.EOF
		Dim memoVal
		memoVal = rs.Fields("resume_doc")
		Response.Write("<tr><td><B>Resume:</B></td><td>" & memoVal & "</td></tr>") 
		rs.MoveNext	
	Wend
	Response.Write("</table>")
Else
	Response.Write("Sorry, no records!!")
End If

Reply With Quote
  #33  
Old October 27th, 2009, 09:16 AM
sync_or_swim's Avatar
sync_or_swim sync_or_swim is offline
Moderator
Click here for more information.
 
Join Date: Mar 2006
Location: South Wales
Posts: 3,461 sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level) 
Time spent in forums: 2 Months 1 Day 16 h 50 m 26 sec
Reputation Power: 1806
Threads Merged. Please refrain from cross posting, there should only be one active thread per topic. As well as keeing all related content in the same place, it is really frustrating for people like me who have just spent 10 minutes answering your question only to find that it has already been answered elsewhere!!

Reply With Quote
  #34  
Old October 27th, 2009, 09:55 AM
igidttam igidttam is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Oct 2009
Posts: 26 igidttam User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 23 m 27 sec
Reputation Power: 0
I'm using the GET method because the user takes the results from this query and may do some updates to other fields on the records returned from the query.
I used the variable as suggested and entered 3 keywords in the form. After submitting the form, the page did not display.
Not sure what went wrong here. Being I'm not very familar with asp, I believe it is a syntax issue. I followed what you were doing in your reply. Would you kindly take a look at my code and explain what I have wrong?
I'll provide all the code here so you can see what I'm trying to do. Thank you for your help..

Here's the code ...


Code:
<% @ LANGUAGE="VBScript" %>
<%

Option Explicit
Response.Buffer = True

Const adOpenForwardOnly = 0
Const adLockReadOnly = 1
Const adUseClient = 3
Const adCmdText = 1


 Dim conn, rs, sql
 Dim strURL     ' The URL of this page so the form will work
 ' Retreive the URL of this page from Server Variables
strURL = Request.ServerVariables("URL") 
Dim rstSearch  ' ADO recordset
Dim strSearch  ' The text being looked for
Dim strSearch1  ' The text being looked for
Dim strSearch2  ' The text being looked for
 


strSearch = Request.QueryString("search")


 Set conn = Server.CreateObject("ADODB.Connection")
 conn.open("RSA_262093")
%>

<%

'*************************************************  ****************************
' HIGHLIGHT function will search text for a specific string
' When string is found it will be surrounded by supplied strings
'
' NOTE: Unfortunately Replace() function does not preserve the original case 
' of the found string. This function does.
'
' Parameters:
' strText 	- string to search in
' strFind	- string to look for
' strBefore	- string to insert before the strFind
' strAfter 	- string to insert after the strFind
'
' Example: 
' This will make all the instances of the word "the" bold
'
' Response.Write Highlight(strSomeText, "the", "<b>", "</b>")
'
Function Highlight(strText, strFind, strBefore, strAfter)
	Dim nPos
	Dim nLen
	Dim nLenAll
	
	nLen = Len(strFind)
	nLenAll = nLen + Len(strBefore) + Len(strAfter) + 1

	Highlight = strText

	If nLen > 0 And Len(Highlight) > 0 Then
		nPos = InStr(1, Highlight, strFind, 1)
		Do While nPos > 0
			Highlight = Left(Highlight, nPos - 1) & _
				strBefore & Mid(Highlight, nPos, nLen) & strAfter & _
				Mid(Highlight, nPos + nLen)

			nPos = InStr(nPos + nLenAll, Highlight, strFind, 1)
		Loop
	End If
End Function


'*************************************************  ****************************
%>




<html> 
<body bgcolor="#FFFFFF">



<p><B>Search and/or Update a Candidates' Record by the Resume Document field</B></p>  
<p></p>
<form action="<%= strURL %>" method="get">
<input name="search" value="<%= strSearch %>" />
<p>


<p><B>Enter a second key word you want to search for or % in the text box below</B></p>  
<p></p>

<input name="search1" value="<%= strSearch1 %>" />
<p>



<p><B>Enter a third key word you want to search for or % in the text box below</B></p>  
<p></p>

<input name="search2" value="<%= strSearch2 %>" />
<p>



<input type="submit" />
</p>
</form>
<p></p>

 
<% 
If strSearch <> "" Then
 Set rs = Server.CreateObject("ADODB.Recordset") 

 sql = "SELECT * FROM [RSA_Candidates] WHERE 1 = 1 " 

If Len(Trim(Request.Form("strSearch"))) > 0 Then sql = sql & "AND resume_doc LIKE '%"& Replace(Request.Form("strSearch"), "'", 

"''") & "%' "
If Len(Trim(Request.Form("strSearch1"))) > 0 Then sql = sql & "AND resume_doc LIKE '%"& Replace(Request.Form("strSearch1"), "'", 

"''") & "%' "
If Len(Trim(Request.Form("strSearch2"))) > 0 Then sql = sql & "AND resume_doc LIKE '%"& Replace(Request.Form("strSearch2"), "'", 

"''") & "%' "

sql = sql & " ORDER BY lastname;"
  
    
 rs.Open sql, conn, adOpenForwardOnly, adLockReadOnly, adCmdText
%> 


<%
IF not Rs.EOF then
 Do While not Rs.EOF


Dim memoVal
memoVal = rs.Fields("resume_doc")

Response.Write "<FORM name='Update' method='post' action='UpdateT.asp'>" 

Response.Write "<table border=1 cellspacing=2>" 

 

 
   Response.Write ("<tr>") 
    Response.Write("<td colspan='1' align='center'>"&"<input type ='submit' name='submit' value='Update' >"&"</td>")
    Response.Write ("<td>" & " <input type='radio' name='ID' value=" & rs("ID") & "></td>") 
    Response.Write ("<td>" & "<B>"  & "Last Name: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("LastName")  & "</td>") 

    Response.Write ("<td>" & "<B>"  & "First Name: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("FirstName")  & "</td>") 
  
    Response.Write ("<td>" & "<B>"  & "MI: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("MI")  & "</td>") 

    Response.Write ("<td>" & "<B>"  & "Title: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("title")  & "</td>")
    
    Response.Write ("<td>" & "<B>"  & "Company: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("Company")  & "</td>")

 
    Response.Write "<table border=1 cellspacing=2>" 
   Response.Write ("<tr>") 
    Response.Write ("<td>" & "<B>"  & "Client: " & "</B>" & "</td>") 
    Response.Write ("<td> <font color='#FF0000'>" & rs("Client")  & " </font></td>")
    Response.Write ("<td rowspan=21 valign='top'>" & rs("Notes") & "</td>") 
    Response.Write ("</tr>") 


   Response.Write ("<tr>") 
    Response.Write ("<td>" & "<B>"  & "Industry: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("industry")  & "</td>")
    Response.Write ("</tr>")


    Response.Write ("<tr>") 
    Response.Write ("<td>" & "<B>"  & "Discipline: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("discipline")  & "</td>")
    Response.Write ("</tr>") 

   Response.Write ("<tr>") 
    Response.Write ("<td>" & "<B>"  & "Compensation: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("compensation")  & "</td>")
    Response.Write ("</tr>") 
  
   Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Cell Phone: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("cell_phone")  & "</td>")
   Response.Write ("</tr>") 

    Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Office Phone: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("office_phone")  & "</td>")
   Response.Write ("</tr>") 

    Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Home Phone: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("home_phone")  & "</td>")
   Response.Write ("</tr>") 

   Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Fax: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("fax")  & "</td>")
   Response.Write ("</tr>") 

    Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Email: " & "</B>" & "</td>")
     Response.Write ("<td><A HREF=mailto:"& rs("email") & "> "& rs("email") &" </A></td>")
   Response.Write ("</tr>") 
   

   Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Address: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("address")  & "</td>")
   Response.Write ("</tr>")    


   Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "City: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("City")  & "</td>")
   Response.Write ("</tr>") 

   Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "State: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("state")  & "</td>")
   Response.Write ("</tr>") 

  Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Zip: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("zip")  & "</td>")
   Response.Write ("</tr>") 


  Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Relocation: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("Relocation")  & "</td>")
   Response.Write ("</tr>") 


   Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Education: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("Education")  & "</td>")
   Response.Write ("</tr>") 


  Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Affiliations: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("Affiliations")  & "</td>")
   Response.Write ("</tr>") 

  
  Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Refered By: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("Refer_by")  & "</td>")
   Response.Write ("</tr>") 
  
   Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Resume on File: " & "</B>" & "</td>")
    Response.Write ("<td><A HREF=http://www.rsaexecsearch.com/rsa/resumes/" & rs("Resume")  & "> "& rs("Resume") &"</A></td>")
   Response.Write ("</tr>") 

   Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "References: " & "</B>" & "</td>")
    Response.Write ("<td><A HREF=http://www.rsaexecsearch.com/rsa/references/" & rs("References")  & "> "& rs("References") 

&"</A></td>")
   Response.Write ("</tr>")
  



   Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Date of First Entry: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("Date_first_entry")  & "</td>")
   Response.Write ("</tr>") 


  Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Date of Last Entry: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("Date_last_entry")  & "</td>")
   Response.Write ("</tr>") 


 Response.Write "<table border=1 cellspacing=2>"
   Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Resume: " & "</B>" & "</td>")
   Response.Write ("<td>" &  memoVal & "</td>")
   Response.Write ("</tr>") 



   Response.Write ("<tr>") 
     Response.Write ("<td BGCOLOR=#ffff00 colspan=5>&nbsp;</td>")
      
   Response.Write ("</tr>") 
      



    Response.Write ("</tr>") 
    Rs.MoveNext
Loop 
else 
   Response.Write("No records found")
end if
 
Response.Write "</table>" 
Response.Write "</table>" 
Rs.Close 
Set Rs = Nothing 
Set Conn = Nothing 
End If
%> 
</form> 
</body> 
</html> 

Reply With Quote
  #35  
Old October 27th, 2009, 10:43 AM
igidttam igidttam is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Oct 2009
Posts: 26 igidttam User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 23 m 27 sec
Reputation Power: 0
I posted the sql to another thread to ensure that wasn't the issue and it isn't.

I still can't get this to work. I appreciate your time spent on this. Just need to get it to work now. Please review my last reply and advise what is wrong with the syntax. Thanks again

Reply With Quote
  #36  
Old October 27th, 2009, 12:22 PM
sync_or_swim's Avatar
sync_or_swim sync_or_swim is offline
Moderator
Click here for more information.
 
Join Date: Mar 2006
Location: South Wales
Posts: 3,461 sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level) 
Time spent in forums: 2 Months 1 Day 16 h 50 m 26 sec
Reputation Power: 1806
Quote:
Originally Posted by igidttam
I'm using the GET method because the user takes the results from this query and may do some updates to other fields on the records returned from the query.

I'm not sure I understand what you mean by this. IMO it is better to use the POST method instead of GET because it means that your values will be passed via the form collection and wont be visible in the addressbar. You can grab them in much the same way, just use Request or Request.Form instead of Request.Querystring!! If you need to access these values on another page you could put the values into session variables which can be accessed on any page, eg:
Code:
Session("search1") = Request.Form("strSearch1")

Quote:
Originally Posted by igidttam
I used the variable as suggested and entered 3 keywords in the form. After submitting the form, the page did not display.

Did it give you an error or did the page just appear blank?

Reply With Quote
  #37  
Old October 27th, 2009, 03:04 PM
igidttam igidttam is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Oct 2009
Posts: 26 igidttam User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 23 m 27 sec
Reputation Power: 0
Unhappy

I tried using the post method and only the form appears.
When I enter the three keywords and press enter, the form just reappears with blanks in the text box.
I also added the session variables but I'm not sure how to use them.
Here's the code with the latest changes .....

Code:
<% @ LANGUAGE="VBScript" %>
<%

Option Explicit
Response.Buffer = True

Const adOpenForwardOnly = 0
Const adLockReadOnly = 1
Const adUseClient = 3
Const adCmdText = 1


 Dim conn, rs, sql
 Dim strURL     ' The URL of this page so the form will work
 ' Retreive the URL of this page from Server Variables
strURL = Request.ServerVariables("URL") 
Dim rstSearch  ' ADO recordset
Dim strSearch  ' The text being looked for
Dim strSearch1  ' The text being looked for
Dim strSearch2  ' The text being looked for
 



strSearch = Request.QueryString("search")


 Set conn = Server.CreateObject("ADODB.Connection")
 conn.open("RSA_262093")
%>

<%

'*************************************************  ****************************
' HIGHLIGHT function will search text for a specific string
' When string is found it will be surrounded by supplied strings
'
' NOTE: Unfortunately Replace() function does not preserve the original case 
' of the found string. This function does.
'
' Parameters:
' strText 	- string to search in
' strFind	- string to look for
' strBefore	- string to insert before the strFind
' strAfter 	- string to insert after the strFind
'
' Example: 
' This will make all the instances of the word "the" bold
'
' Response.Write Highlight(strSomeText, "the", "<b>", "</b>")
'
Function Highlight(strText, strFind, strBefore, strAfter)
	Dim nPos
	Dim nLen
	Dim nLenAll
	
	nLen = Len(strFind)
	nLenAll = nLen + Len(strBefore) + Len(strAfter) + 1

	Highlight = strText

	If nLen > 0 And Len(Highlight) > 0 Then
		nPos = InStr(1, Highlight, strFind, 1)
		Do While nPos > 0
			Highlight = Left(Highlight, nPos - 1) & _
				strBefore & Mid(Highlight, nPos, nLen) & strAfter & _
				Mid(Highlight, nPos + nLen)

			nPos = InStr(nPos + nLenAll, Highlight, strFind, 1)
		Loop
	End If
End Function


'*************************************************  ****************************
%>




<html> 
<body bgcolor="#FFFFFF">



<p><B>Search and/or Update a Candidates' Record by the Resume Document field</B></p>  
<p></p>
<form action="<%= strURL %>" method="post">
<input name="search" value="<%= strSearch %>" />
<p>


<p><B>Enter a second key word you want to search for or % in the text box below</B></p>  
<p></p>

<input name="search1" value="<%= strSearch1 %>" />
<p>



<p><B>Enter a third key word you want to search for or % in the text box below</B></p>  
<p></p>

<input name="search2" value="<%= strSearch2 %>" />
<p>



<input type="submit" />
</p>
</form>
<p></p>

 
<% 
If strSearch <> "" Then
 Set rs = Server.CreateObject("ADODB.Recordset") 

 sql = "SELECT * FROM [RSA_Candidates] WHERE 1 = 1 " 

If Len(Trim(Request.Form("strSearch"))) > 0 Then sql = sql & "AND resume_doc LIKE '%"& Replace(Request.Form("strSearch"), "'", 

"''") & "%' "
If Len(Trim(Request.Form("strSearch1"))) > 0 Then sql = sql & "AND resume_doc LIKE '%"& Replace(Request.Form("strSearch1"), "'", 

"''") & "%' "
If Len(Trim(Request.Form("strSearch2"))) > 0 Then sql = sql & "AND resume_doc LIKE '%"& Replace(Request.Form("strSearch2"), "'", 

"''") & "%' "

sql = sql & " ORDER BY lastname;"
  
    
 rs.Open sql, conn, adOpenForwardOnly, adLockReadOnly, adCmdText
%> 


<%
IF not Rs.EOF then
 Do While not Rs.EOF


Dim memoVal
memoVal = rs.Fields("resume_doc")
Session("search") = Request.Form("strSearch")
Session("search1") = Request.Form("strSearch1")
Session("search2") = Request.Form("strSearch2")

Response.Write "<FORM name='Update' method='post' action='UpdateT.asp'>" 

Response.Write "<table border=1 cellspacing=2>" 

 

 
   Response.Write ("<tr>") 
    Response.Write("<td colspan='1' align='center'>"&"<input type ='submit' name='submit' value='Update' >"&"</td>")
    Response.Write ("<td>" & " <input type='radio' name='ID' value=" & rs("ID") & "></td>") 
    Response.Write ("<td>" & "<B>"  & "Last Name: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("LastName")  & "</td>") 

    Response.Write ("<td>" & "<B>"  & "First Name: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("FirstName")  & "</td>") 
  
    Response.Write ("<td>" & "<B>"  & "MI: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("MI")  & "</td>") 

    Response.Write ("<td>" & "<B>"  & "Title: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("title")  & "</td>")
    
    Response.Write ("<td>" & "<B>"  & "Company: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("Company")  & "</td>")

 
    Response.Write "<table border=1 cellspacing=2>" 
   Response.Write ("<tr>") 
    Response.Write ("<td>" & "<B>"  & "Client: " & "</B>" & "</td>") 
    Response.Write ("<td> <font color='#FF0000'>" & rs("Client")  & " </font></td>")
    Response.Write ("<td rowspan=21 valign='top'>" & rs("Notes") & "</td>") 
    Response.Write ("</tr>") 


   Response.Write ("<tr>") 
    Response.Write ("<td>" & "<B>"  & "Industry: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("industry")  & "</td>")
    Response.Write ("</tr>")


    Response.Write ("<tr>") 
    Response.Write ("<td>" & "<B>"  & "Discipline: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("discipline")  & "</td>")
    Response.Write ("</tr>") 

   Response.Write ("<tr>") 
    Response.Write ("<td>" & "<B>"  & "Compensation: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("compensation")  & "</td>")
    Response.Write ("</tr>") 
  
   Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Cell Phone: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("cell_phone")  & "</td>")
   Response.Write ("</tr>") 

    Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Office Phone: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("office_phone")  & "</td>")
   Response.Write ("</tr>") 

    Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Home Phone: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("home_phone")  & "</td>")
   Response.Write ("</tr>") 

   Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Fax: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("fax")  & "</td>")
   Response.Write ("</tr>") 

    Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Email: " & "</B>" & "</td>")
     Response.Write ("<td><A HREF=mailto:"& rs("email") & "> "& rs("email") &" </A></td>")
   Response.Write ("</tr>") 
   

   Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Address: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("address")  & "</td>")
   Response.Write ("</tr>")    


   Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "City: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("City")  & "</td>")
   Response.Write ("</tr>") 

   Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "State: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("state")  & "</td>")
   Response.Write ("</tr>") 

  Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Zip: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("zip")  & "</td>")
   Response.Write ("</tr>") 


  Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Relocation: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("Relocation")  & "</td>")
   Response.Write ("</tr>") 


   Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Education: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("Education")  & "</td>")
   Response.Write ("</tr>") 


  Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Affiliations: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("Affiliations")  & "</td>")
   Response.Write ("</tr>") 

  
  Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Refered By: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("Refer_by")  & "</td>")
   Response.Write ("</tr>") 
  
   Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Resume on File: " & "</B>" & "</td>")
    Response.Write ("<td><A HREF=http://www.rsaexecsearch.com/rsa/resumes/" & rs("Resume")  & "> "& rs("Resume") &"</A></td>")
   Response.Write ("</tr>") 

   Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "References: " & "</B>" & "</td>")
    Response.Write ("<td><A HREF=http://www.rsaexecsearch.com/rsa/references/" & rs("References")  & "> "& rs("References") 

&"</A></td>")
   Response.Write ("</tr>")
  



   Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Date of First Entry: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("Date_first_entry")  & "</td>")
   Response.Write ("</tr>") 


  Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Date of Last Entry: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("Date_last_entry")  & "</td>")
   Response.Write ("</tr>") 


 Response.Write "<table border=1 cellspacing=2>"
   Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Resume: " & "</B>" & "</td>")
   Response.Write ("<td>" &  memoVal & "</td>")
   Response.Write ("</tr>") 



   Response.Write ("<tr>") 
     Response.Write ("<td BGCOLOR=#ffff00 colspan=5>&nbsp;</td>")
      
   Response.Write ("</tr>") 
      



    Response.Write ("</tr>") 
    Rs.MoveNext
Loop 
else 
   Response.Write("No records found")
end if
 
Response.Write "</table>" 
Response.Write "</table>" 
Rs.Close 
Set Rs = Nothing 
Set Conn = Nothing 
End If
%> 
</form> 
</body> 
</html> 


The goal here is to get all the records that have in their resume_doc field, the 3 keywords the user entered.
Thanks for helping me with this. I appreciate it.

Reply With Quote
  #38  
Old October 28th, 2009, 06:45 AM
sync_or_swim's Avatar
sync_or_swim sync_or_swim is offline
Moderator
Click here for more information.
 
Join Date: Mar 2006
Location: South Wales
Posts: 3,461 sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level) 
Time spent in forums: 2 Months 1 Day 16 h 50 m 26 sec
Reputation Power: 1806
You have changed the method to post but you will only drop into the code if strSearch contains a value, change the highlighted line:
Code:
<% @ LANGUAGE="VBScript" %>
<%

Option Explicit
Response.Buffer = True

Const adOpenForwardOnly = 0
Const adLockReadOnly = 1
Const adUseClient = 3
Const adCmdText = 1


 Dim conn, rs, sql
 Dim strURL     ' The URL of this page so the form will work
 ' Retreive the URL of this page from Server Variables
strURL = Request.ServerVariables("URL") 
Dim rstSearch  ' ADO recordset
Dim strSearch  ' The text being looked for
Dim strSearch1  ' The text being looked for
Dim strSearch2  ' The text being looked for
 



strSearch = Request.Form("search")


 Set conn = Server.CreateObject("ADODB.Connection")
 conn.open("RSA_262093")

'etc...
%>

Reply With Quote
  #39  
Old October 28th, 2009, 09:52 AM
igidttam igidttam is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Oct 2009
Posts: 26 igidttam User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 23 m 27 sec
Reputation Power: 0
I made the change you suggested. The form is displayed and I entered 3 keywords. I submitted the form and after a minute or so received an http 500 Internal Server Error --

The error in Firefox is


Quote:
Response object error 'ASP 0251 : 80004005'
Response Buffer Limit Exceeded
/rsa/search_resume2a.asp, line 0
Execution of the ASP page caused the Response Buffer to exceed its configured limit.


How could I increase the response buffer?

Here's the code as it is now ...

Code:
<% @ LANGUAGE="VBScript" %>
<%

Option Explicit
Response.Buffer = True

Const adOpenForwardOnly = 0
Const adLockReadOnly = 1
Const adUseClient = 3
Const adCmdText = 1


 Dim conn, rs, sql
 Dim strURL     ' The URL of this page so the form will work
 ' Retreive the URL of this page from Server Variables
strURL = Request.ServerVariables("URL") 
Dim rstSearch  ' ADO recordset
Dim strSearch  ' The text being looked for
Dim strSearch1  ' The text being looked for
Dim strSearch2  ' The text being looked for
 



strSearch = Request.Form("search")


 Set conn = Server.CreateObject("ADODB.Connection")
 conn.open("RSA_262093")
%>

<%

'*************************************************  ****************************
' HIGHLIGHT function will search text for a specific string
' When string is found it will be surrounded by supplied strings
'
' NOTE: Unfortunately Replace() function does not preserve the original case 
' of the found string. This function does.
'
' Parameters:
' strText 	- string to search in
' strFind	- string to look for
' strBefore	- string to insert before the strFind
' strAfter 	- string to insert after the strFind
'
' Example: 
' This will make all the instances of the word "the" bold
'
' Response.Write Highlight(strSomeText, "the", "<b>", "</b>")
'
Function Highlight(strText, strFind, strBefore, strAfter)
	Dim nPos
	Dim nLen
	Dim nLenAll
	
	nLen = Len(strFind)
	nLenAll = nLen + Len(strBefore) + Len(strAfter) + 1

	Highlight = strText

	If nLen > 0 And Len(Highlight) > 0 Then
		nPos = InStr(1, Highlight, strFind, 1)
		Do While nPos > 0
			Highlight = Left(Highlight, nPos - 1) & _
				strBefore & Mid(Highlight, nPos, nLen) & strAfter & _
				Mid(Highlight, nPos + nLen)

			nPos = InStr(nPos + nLenAll, Highlight, strFind, 1)
		Loop
	End If
End Function


'*************************************************  ****************************
%>




<html> 
<body bgcolor="#FFFFFF">



<p><B>Search and/or Update a Candidates' Record by the Resume Document field</B></p>  
<p></p>
<form action="<%= strURL %>" method="post">
<input name="search" value="<%= strSearch %>" />
<p>


<p><B>Enter a second key word you want to search for or % in the text box below</B></p>  
<p></p>

<input name="search1" value="<%= strSearch1 %>" />
<p>



<p><B>Enter a third key word you want to search for or % in the text box below</B></p>  
<p></p>

<input name="search2" value="<%= strSearch2 %>" />
<p>



<input type="submit" />
</p>
</form>
<p></p>

 
<% 
If strSearch <> "" Then
 Set rs = Server.CreateObject("ADODB.Recordset") 

 sql = "SELECT * FROM [RSA_Candidates] WHERE 1 = 1 " 

If Len(Trim(Request.Form("strSearch"))) > 0 Then sql = sql & "AND resume_doc LIKE '%"& Replace(Request.Form("strSearch"), "'", "''") & "%' "
If Len(Trim(Request.Form("strSearch1"))) > 0 Then sql = sql & "AND resume_doc LIKE '%"& Replace(Request.Form("strSearch1"), "'", "''") & "%' "
If Len(Trim(Request.Form("strSearch2"))) > 0 Then sql = sql & "AND resume_doc LIKE '%"& Replace(Request.Form("strSearch2"), "'", "''") & "%' "

sql = sql & " ORDER BY lastname;"
  
    
 rs.Open sql, conn, adOpenForwardOnly, adLockReadOnly, adCmdText
%> 


<%
IF not Rs.EOF then
 Do While not Rs.EOF


Dim memoVal
memoVal = rs.Fields("resume_doc")
Session("search") = Request.Form("strSearch")
Session("search1") = Request.Form("strSearch1")
Session("search2") = Request.Form("strSearch2")

Response.Write "<FORM name='Update' method='post' action='UpdateT.asp'>" 

Response.Write "<table border=1 cellspacing=2>" 

 

 
   Response.Write ("<tr>") 
    Response.Write("<td colspan='1' align='center'>"&"<input type ='submit' name='submit' value='Update' >"&"</td>")
    Response.Write ("<td>" & " <input type='radio' name='ID' value=" & rs("ID") & "></td>") 
    Response.Write ("<td>" & "<B>"  & "Last Name: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("LastName")  & "</td>") 

    Response.Write ("<td>" & "<B>"  & "First Name: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("FirstName")  & "</td>") 
  
    Response.Write ("<td>" & "<B>"  & "MI: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("MI")  & "</td>") 

    Response.Write ("<td>" & "<B>"  & "Title: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("title")  & "</td>")
    
    Response.Write ("<td>" & "<B>"  & "Company: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("Company")  & "</td>")

 
    Response.Write "<table border=1 cellspacing=2>" 
   Response.Write ("<tr>") 
    Response.Write ("<td>" & "<B>"  & "Client: " & "</B>" & "</td>") 
    Response.Write ("<td> <font color='#FF0000'>" & rs("Client")  & " </font></td>")
    Response.Write ("<td rowspan=21 valign='top'>" & rs("Notes") & "</td>") 
    Response.Write ("</tr>") 


   Response.Write ("<tr>") 
    Response.Write ("<td>" & "<B>"  & "Industry: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("industry")  & "</td>")
    Response.Write ("</tr>")


    Response.Write ("<tr>") 
    Response.Write ("<td>" & "<B>"  & "Discipline: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("discipline")  & "</td>")
    Response.Write ("</tr>") 

   Response.Write ("<tr>") 
    Response.Write ("<td>" & "<B>"  & "Compensation: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("compensation")  & "</td>")
    Response.Write ("</tr>") 
  
   Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Cell Phone: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("cell_phone")  & "</td>")
   Response.Write ("</tr>") 

    Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Office Phone: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("office_phone")  & "</td>")
   Response.Write ("</tr>") 

    Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Home Phone: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("home_phone")  & "</td>")
   Response.Write ("</tr>") 

   Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Fax: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("fax")  & "</td>")
   Response.Write ("</tr>") 

    Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Email: " & "</B>" & "</td>")
     Response.Write ("<td><A HREF=mailto:"& rs("email") & "> "& rs("email") &" </A></td>")
   Response.Write ("</tr>") 
   

   Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Address: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("address")  & "</td>")
   Response.Write ("</tr>")    


   Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "City: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("City")  & "</td>")
   Response.Write ("</tr>") 

   Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "State: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("state")  & "</td>")
   Response.Write ("</tr>") 

  Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Zip: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("zip")  & "</td>")
   Response.Write ("</tr>") 


  Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Relocation: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("Relocation")  & "</td>")
   Response.Write ("</tr>") 


   Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Education: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("Education")  & "</td>")
   Response.Write ("</tr>") 


  Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Affiliations: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("Affiliations")  & "</td>")
   Response.Write ("</tr>") 

  
  Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Refered By: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("Refer_by")  & "</td>")
   Response.Write ("</tr>") 
  
   Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Resume on File: " & "</B>" & "</td>")
    Response.Write ("<td><A HREF=http://www.rsaexecsearch.com/rsa/resumes/" & rs("Resume")  & "> "& rs("Resume") &"</A></td>")
   Response.Write ("</tr>") 

   Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "References: " & "</B>" & "</td>")
    Response.Write ("<td><A HREF=http://www.rsaexecsearch.com/rsa/references/" & rs("References")  & "> "& rs("References") &"</A></td>")
   Response.Write ("</tr>")
  



   Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Date of First Entry: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("Date_first_entry")  & "</td>")
   Response.Write ("</tr>") 


  Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Date of Last Entry: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("Date_last_entry")  & "</td>")
   Response.Write ("</tr>") 


 Response.Write "<table border=1 cellspacing=2>"
   Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Resume: " & "</B>" & "</td>")
   Response.Write ("<td>" &  memoVal & "</td>")
   Response.Write ("</tr>") 



   Response.Write ("<tr>") 
     Response.Write ("<td BGCOLOR=#ffff00 colspan=5>&nbsp;</td>")
      
   Response.Write ("</tr>") 
      



    Response.Write ("</tr>") 
    Rs.MoveNext
Loop 
else 
   Response.Write("No records found")
end if
 
Response.Write "</table>" 
Response.Write "</table>" 
Rs.Close 
Set Rs = Nothing 
Set Conn = Nothing 
End If
%> 
</form> 
</body> 
</html> 


Thank you again for your help and time. I sincerely appreciate it..

Reply With Quote
  #40  
Old October 28th, 2009, 11:53 AM
sync_or_swim's Avatar
sync_or_swim sync_or_swim is offline
Moderator
Click here for more information.
 
Join Date: Mar 2006
Location: South Wales
Posts: 3,461 sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level) 
Time spent in forums: 2 Months 1 Day 16 h 50 m 26 sec
Reputation Power: 1806
What does your sql statement contain, can you add the highlighted lines and post the result:
Code:
<% 
If strSearch <> "" Then
 Set rs = Server.CreateObject("ADODB.Recordset") 

 sql = "SELECT * FROM [RSA_Candidates] WHERE 1 = 1 " 

If Len(Trim(Request.Form("strSearch"))) > 0 Then sql = sql & "AND resume_doc LIKE '%"& Replace(Request.Form("strSearch"), "'", "''") & "%' "
If Len(Trim(Request.Form("strSearch1"))) > 0 Then sql = sql & "AND resume_doc LIKE '%"& Replace(Request.Form("strSearch1"), "'", "''") & "%' "
If Len(Trim(Request.Form("strSearch2"))) > 0 Then sql = sql & "AND resume_doc LIKE '%"& Replace(Request.Form("strSearch2"), "'", "''") & "%' "

sql = sql & " ORDER BY lastname;"
  

Response.Write(sql)
Response.End

 rs.Open sql, conn, adOpenForwardOnly, adLockReadOnly, adCmdText
%> 


<%
IF not Rs.EOF then
 Do While not Rs.EOF

Reply With Quote
  #41  
Old October 28th, 2009, 03:05 PM
igidttam igidttam is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Oct 2009
Posts: 26 igidttam User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 23 m 27 sec
Reputation Power: 0
I put the 2 lines of code in as requested.
This was the result

Quote:
SELECT * FROM [RSA_Candidates] WHERE 1 = 1 ORDER BY lastname;



Here is the revised code with the 2 new lines added ..


Code:
<% @ LANGUAGE="VBScript" %>
<%

Option Explicit
Response.Buffer = True

Const adOpenForwardOnly = 0
Const adLockReadOnly = 1
Const adUseClient = 3
Const adCmdText = 1


 Dim conn, rs, sql
 Dim strURL     ' The URL of this page so the form will work
 ' Retreive the URL of this page from Server Variables
strURL = Request.ServerVariables("URL") 
Dim rstSearch  ' ADO recordset
Dim strSearch  ' The text being looked for
Dim strSearch1  ' The text being looked for
Dim strSearch2  ' The text being looked for
 



strSearch = Request.Form("search")


 Set conn = Server.CreateObject("ADODB.Connection")
 conn.open("RSA_262093")
%>

<%

'*************************************************  ****************************
' HIGHLIGHT function will search text for a specific string
' When string is found it will be surrounded by supplied strings
'
' NOTE: Unfortunately Replace() function does not preserve the original case 
' of the found string. This function does.
'
' Parameters:
' strText 	- string to search in
' strFind	- string to look for
' strBefore	- string to insert before the strFind
' strAfter 	- string to insert after the strFind
'
' Example: 
' This will make all the instances of the word "the" bold
'
' Response.Write Highlight(strSomeText, "the", "<b>", "</b>")
'
Function Highlight(strText, strFind, strBefore, strAfter)
	Dim nPos
	Dim nLen
	Dim nLenAll
	
	nLen = Len(strFind)
	nLenAll = nLen + Len(strBefore) + Len(strAfter) + 1

	Highlight = strText

	If nLen > 0 And Len(Highlight) > 0 Then
		nPos = InStr(1, Highlight, strFind, 1)
		Do While nPos > 0
			Highlight = Left(Highlight, nPos - 1) & _
				strBefore & Mid(Highlight, nPos, nLen) & strAfter & _
				Mid(Highlight, nPos + nLen)

			nPos = InStr(nPos + nLenAll, Highlight, strFind, 1)
		Loop
	End If
End Function


'*************************************************  ****************************
%>




<html> 
<body bgcolor="#FFFFFF">



<p><B>Search and/or Update a Candidates' Record by the Resume Document field</B></p>  
<p></p>
<form action="<%= strURL %>" method="post">
<input name="search" value="<%= strSearch %>" />
<p>


<p><B>Enter a second key word you want to search for or % in the text box below</B></p>  
<p></p>

<input name="search1" value="<%= strSearch1 %>" />
<p>



<p><B>Enter a third key word you want to search for or % in the text box below</B></p>  
<p></p>

<input name="search2" value="<%= strSearch2 %>" />
<p>



<input type="submit" />
</p>
</form>
<p></p>

 
<% 
If strSearch <> "" Then
 Set rs = Server.CreateObject("ADODB.Recordset") 

 sql = "SELECT * FROM [RSA_Candidates] WHERE 1 = 1 " 

If Len(Trim(Request.Form("strSearch"))) > 0 Then sql = sql & "AND resume_doc LIKE '%"& Replace(Request.Form("strSearch"), "'", "''") & "%' "
If Len(Trim(Request.Form("strSearch1"))) > 0 Then sql = sql & "AND resume_doc LIKE '%"& Replace(Request.Form("strSearch1"), "'", "''") & "%' "
If Len(Trim(Request.Form("strSearch2"))) > 0 Then sql = sql & "AND resume_doc LIKE '%"& Replace(Request.Form("strSearch2"), "'", "''") & "%' "

sql = sql & " ORDER BY lastname;"

Response.Write(sql)
Response.End

  
    
 rs.Open sql, conn, adOpenForwardOnly, adLockReadOnly, adCmdText
%> 


<%
IF not Rs.EOF then
 Do While not Rs.EOF


Dim memoVal
memoVal = rs.Fields("resume_doc")
Session("search") = Request.Form("strSearch")
Session("search1") = Request.Form("strSearch1")
Session("search2") = Request.Form("strSearch2")

Response.Write "<FORM name='Update' method='post' action='UpdateT.asp'>" 

Response.Write "<table border=1 cellspacing=2>" 

 

 
   Response.Write ("<tr>") 
    Response.Write("<td colspan='1' align='center'>"&"<input type ='submit' name='submit' value='Update' >"&"</td>")
    Response.Write ("<td>" & " <input type='radio' name='ID' value=" & rs("ID") & "></td>") 
    Response.Write ("<td>" & "<B>"  & "Last Name: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("LastName")  & "</td>") 

    Response.Write ("<td>" & "<B>"  & "First Name: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("FirstName")  & "</td>") 
  
    Response.Write ("<td>" & "<B>"  & "MI: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("MI")  & "</td>") 

    Response.Write ("<td>" & "<B>"  & "Title: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("title")  & "</td>")
    
    Response.Write ("<td>" & "<B>"  & "Company: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("Company")  & "</td>")

 
    Response.Write "<table border=1 cellspacing=2>" 
   Response.Write ("<tr>") 
    Response.Write ("<td>" & "<B>"  & "Client: " & "</B>" & "</td>") 
    Response.Write ("<td> <font color='#FF0000'>" & rs("Client")  & " </font></td>")
    Response.Write ("<td rowspan=21 valign='top'>" & rs("Notes") & "</td>") 
    Response.Write ("</tr>") 


   Response.Write ("<tr>") 
    Response.Write ("<td>" & "<B>"  & "Industry: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("industry")  & "</td>")
    Response.Write ("</tr>")


    Response.Write ("<tr>") 
    Response.Write ("<td>" & "<B>"  & "Discipline: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("discipline")  & "</td>")
    Response.Write ("</tr>") 

   Response.Write ("<tr>") 
    Response.Write ("<td>" & "<B>"  & "Compensation: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("compensation")  & "</td>")
    Response.Write ("</tr>") 
  
   Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Cell Phone: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("cell_phone")  & "</td>")
   Response.Write ("</tr>") 

    Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Office Phone: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("office_phone")  & "</td>")
   Response.Write ("</tr>") 

    Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Home Phone: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("home_phone")  & "</td>")
   Response.Write ("</tr>") 

   Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Fax: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("fax")  & "</td>")
   Response.Write ("</tr>") 

    Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Email: " & "</B>" & "</td>")
     Response.Write ("<td><A HREF=mailto:"& rs("email") & "> "& rs("email") &" </A></td>")
   Response.Write ("</tr>") 
   

   Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Address: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("address")  & "</td>")
   Response.Write ("</tr>")    


   Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "City: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("City")  & "</td>")
   Response.Write ("</tr>") 

   Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "State: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("state")  & "</td>")
   Response.Write ("</tr>") 

  Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Zip: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("zip")  & "</td>")
   Response.Write ("</tr>") 


  Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Relocation: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("Relocation")  & "</td>")
   Response.Write ("</tr>") 


   Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Education: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("Education")  & "</td>")
   Response.Write ("</tr>") 


  Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Affiliations: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("Affiliations")  & "</td>")
   Response.Write ("</tr>") 

  
  Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Refered By: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("Refer_by")  & "</td>")
   Response.Write ("</tr>") 
  
   Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Resume on File: " & "</B>" & "</td>")
    Response.Write ("<td><A HREF=http://www.rsaexecsearch.com/rsa/resumes/" & rs("Resume")  & "> "& rs("Resume") &"</A></td>")
   Response.Write ("</tr>") 

   Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "References: " & "</B>" & "</td>")
    Response.Write ("<td><A HREF=http://www.rsaexecsearch.com/rsa/references/" & rs("References")  & "> "& rs("References") &"</A></td>")
   Response.Write ("</tr>")
  



   Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Date of First Entry: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("Date_first_entry")  & "</td>")
   Response.Write ("</tr>") 


  Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Date of Last Entry: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("Date_last_entry")  & "</td>")
   Response.Write ("</tr>") 


 Response.Write "<table border=1 cellspacing=2>"
   Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Resume: " & "</B>" & "</td>")
   Response.Write ("<td>" &  memoVal & "</td>")
   Response.Write ("</tr>") 



   Response.Write ("<tr>") 
     Response.Write ("<td BGCOLOR=#ffff00 colspan=5>&nbsp;</td>")
      
   Response.Write ("</tr>") 
      



    Response.Write ("</tr>") 
    Rs.MoveNext
Loop 
else 
   Response.Write("No records found")
end if
 
Response.Write "</table>" 
Response.Write "</table>" 
Rs.Close 
Set Rs = Nothing 
Set Conn = Nothing 
End If
%> 
</form> 
</body> 
</html> 

Reply With Quote
  #42  
Old October 29th, 2009, 04:04 AM
new learner new learner is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: May 2008
Location: India
Posts: 296 new learner User rank is First Lieutenant (10000 - 20000 Reputation Level)new learner User rank is First Lieutenant (10000 - 20000 Reputation Level)new learner User rank is First Lieutenant (10000 - 20000 Reputation Level)new learner User rank is First Lieutenant (10000 - 20000 Reputation Level)new learner User rank is First Lieutenant (10000 - 20000 Reputation Level)new learner User rank is First Lieutenant (10000 - 20000 Reputation Level)new learner User rank is First Lieutenant (10000 - 20000 Reputation Level)new learner User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 5 Days 7 h 25 m 25 sec
Reputation Power: 127
Quote:
Originally Posted by igidttam
I put the 2 lines of code in as requested.
This was the result




Here is the revised code with the 2 new lines added ..


Code:
<% @ LANGUAGE="VBScript" %>
<%

Option Explicit
Response.Buffer = True

Const adOpenForwardOnly = 0
Const adLockReadOnly = 1
Const adUseClient = 3
Const adCmdText = 1


 Dim conn, rs, sql
 Dim strURL     ' The URL of this page so the form will work
 ' Retreive the URL of this page from Server Variables
strURL = Request.ServerVariables("URL") 
Dim rstSearch  ' ADO recordset
Dim strSearch  ' The text being looked for
Dim strSearch1  ' The text being looked for
Dim strSearch2  ' The text being looked for
 



strSearch = Request.Form("search")


 Set conn = Server.CreateObject("ADODB.Connection")
 conn.open("RSA_262093")
%>

<%

'*************************************************  ****************************
' HIGHLIGHT function will search text for a specific string
' When string is found it will be surrounded by supplied strings
'
' NOTE: Unfortunately Replace() function does not preserve the original case 
' of the found string. This function does.
'
' Parameters:
' strText 	- string to search in
' strFind	- string to look for
' strBefore	- string to insert before the strFind
' strAfter 	- string to insert after the strFind
'
' Example: 
' This will make all the instances of the word "the" bold
'
' Response.Write Highlight(strSomeText, "the", "<b>", "</b>")
'
Function Highlight(strText, strFind, strBefore, strAfter)
	Dim nPos
	Dim nLen
	Dim nLenAll
	
	nLen = Len(strFind)
	nLenAll = nLen + Len(strBefore) + Len(strAfter) + 1

	Highlight = strText

	If nLen > 0 And Len(Highlight) > 0 Then
		nPos = InStr(1, Highlight, strFind, 1)
		Do While nPos > 0
			Highlight = Left(Highlight, nPos - 1) & _
				strBefore & Mid(Highlight, nPos, nLen) & strAfter & _
				Mid(Highlight, nPos + nLen)

			nPos = InStr(nPos + nLenAll, Highlight, strFind, 1)
		Loop
	End If
End Function


'*************************************************  ****************************
%>




<html> 
<body bgcolor="#FFFFFF">



<p><B>Search and/or Update a Candidates' Record by the Resume Document field</B></p>  
<p></p>
<form action="<%= strURL %>" method="post">
<input name="search" value="<%= strSearch %>" />
<p>


<p><B>Enter a second key word you want to search for or % in the text box below</B></p>  
<p></p>

<input name="search1" value="<%= strSearch1 %>" />
<p>



<p><B>Enter a third key word you want to search for or % in the text box below</B></p>  
<p></p>

<input name="search2" value="<%= strSearch2 %>" />
<p>



<input type="submit" />
</p>
</form>
<p></p>

 
<% 
If strSearch <> "" Then
 Set rs = Server.CreateObject("ADODB.Recordset") 

 sql = "SELECT * FROM [RSA_Candidates] WHERE 1 = 1 " 

If Len(Trim(Request.Form("strSearch"))) > 0 Then sql = sql & "AND resume_doc LIKE '%"& Replace(Request.Form("strSearch"), "'", "''") & "%' "
If Len(Trim(Request.Form("strSearch1"))) > 0 Then sql = sql & "AND resume_doc LIKE '%"& Replace(Request.Form("strSearch1"), "'", "''") & "%' "
If Len(Trim(Request.Form("strSearch2"))) > 0 Then sql = sql & "AND resume_doc LIKE '%"& Replace(Request.Form("strSearch2"), "'", "''") & "%' "

sql = sql & " ORDER BY lastname;"

Response.Write(sql)
Response.End

  
    
 rs.Open sql, conn, adOpenForwardOnly, adLockReadOnly, adCmdText
%> 


<%
IF not Rs.EOF then
 Do While not Rs.EOF


Dim memoVal
memoVal = rs.Fields("resume_doc")
Session("search") = Request.Form("strSearch")
Session("search1") = Request.Form("strSearch1")
Session("search2") = Request.Form("strSearch2")

Response.Write "<FORM name='Update' method='post' action='UpdateT.asp'>" 

Response.Write "<table border=1 cellspacing=2>" 

 

 
   Response.Write ("<tr>") 
    Response.Write("<td colspan='1' align='center'>"&"<input type ='submit' name='submit' value='Update' >"&"</td>")
    Response.Write ("<td>" & " <input type='radio' name='ID' value=" & rs("ID") & "></td>") 
    Response.Write ("<td>" & "<B>"  & "Last Name: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("LastName")  & "</td>") 

    Response.Write ("<td>" & "<B>"  & "First Name: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("FirstName")  & "</td>") 
  
    Response.Write ("<td>" & "<B>"  & "MI: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("MI")  & "</td>") 

    Response.Write ("<td>" & "<B>"  & "Title: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("title")  & "</td>")
    
    Response.Write ("<td>" & "<B>"  & "Company: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("Company")  & "</td>")

 
    Response.Write "<table border=1 cellspacing=2>" 
   Response.Write ("<tr>") 
    Response.Write ("<td>" & "<B>"  & "Client: " & "</B>" & "</td>") 
    Response.Write ("<td> <font color='#FF0000'>" & rs("Client")  & " </font></td>")
    Response.Write ("<td rowspan=21 valign='top'>" & rs("Notes") & "</td>") 
    Response.Write ("</tr>") 


   Response.Write ("<tr>") 
    Response.Write ("<td>" & "<B>"  & "Industry: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("industry")  & "</td>")
    Response.Write ("</tr>")


    Response.Write ("<tr>") 
    Response.Write ("<td>" & "<B>"  & "Discipline: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("discipline")  & "</td>")
    Response.Write ("</tr>") 

   Response.Write ("<tr>") 
    Response.Write ("<td>" & "<B>"  & "Compensation: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("compensation")  & "</td>")
    Response.Write ("</tr>") 
  
   Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Cell Phone: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("cell_phone")  & "</td>")
   Response.Write ("</tr>") 

    Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Office Phone: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("office_phone")  & "</td>")
   Response.Write ("</tr>") 

    Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Home Phone: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("home_phone")  & "</td>")
   Response.Write ("</tr>") 

   Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Fax: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("fax")  & "</td>")
   Response.Write ("</tr>") 

    Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Email: " & "</B>" & "</td>")
     Response.Write ("<td><A HREF=mailto:"& rs("email") & "> "& rs("email") &" </A></td>")
   Response.Write ("</tr>") 
   

   Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Address: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("address")  & "</td>")
   Response.Write ("</tr>")    


   Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "City: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("City")  & "</td>")
   Response.Write ("</tr>") 

   Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "State: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("state")  & "</td>")
   Response.Write ("</tr>") 

  Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Zip: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("zip")  & "</td>")
   Response.Write ("</tr>") 


  Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Relocation: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("Relocation")  & "</td>")
   Response.Write ("</tr>") 


   Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Education: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("Education")  & "</td>")
   Response.Write ("</tr>") 


  Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Affiliations: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("Affiliations")  & "</td>")
   Response.Write ("</tr>") 

  
  Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Refered By: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("Refer_by")  & "</td>")
   Response.Write ("</tr>") 
  
   Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Resume on File: " & "</B>" & "</td>")
    Response.Write ("<td><A HREF=http://www.rsaexecsearch.com/rsa/resumes/" & rs("Resume")  & "> "& rs("Resume") &"</A></td>")
   Response.Write ("</tr>") 

   Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "References: " & "</B>" & "</td>")
    Response.Write ("<td><A HREF=http://www.rsaexecsearch.com/rsa/references/" & rs("References")  & "> "& rs("References") &"</A></td>")
   Response.Write ("</tr>")
  



   Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Date of First Entry: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("Date_first_entry")  & "</td>")
   Response.Write ("</tr>") 


  Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Date of Last Entry: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("Date_last_entry")  & "</td>")
   Response.Write ("</tr>") 


 Response.Write "<table border=1 cellspacing=2>"
   Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Resume: " & "</B>" & "</td>")
   Response.Write ("<td>" &  memoVal & "</td>")
   Response.Write ("</tr>") 



   Response.Write ("<tr>") 
     Response.Write ("<td BGCOLOR=#ffff00 colspan=5>&nbsp;</td>")
      
   Response.Write ("</tr>") 
      



    Response.Write ("</tr>") 
    Rs.MoveNext
Loop 
else 
   Response.Write("No records found")
end if
 
Response.Write "</table>" 
Response.Write "</table>" 
Rs.Close 
Set Rs = Nothing 
Set Conn = Nothing 
End If
%> 
</form> 
</body> 
</html> 



Hi,
Till sync comes in

just check whether these values are being passed.

Request.Form("strSearch")
Request.Form("strSearch1")
Request.Form("strSearch2")

with something like
<input name="strSearch">........
<input name="strSearch1">........
<input name="strSearch2">........

Thanx

Reply With Quote
  #43  
Old October 29th, 2009, 09:56 AM
igidttam igidttam is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Oct 2009
Posts: 26 igidttam User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 23 m 27 sec
Reputation Power: 0
Unhappy

I'm not really sure how to do this. I added this code and it's incorrect



Code:
Response.Write(sql)

Response.Write(input name="strSearch")
Response.Write(input name="strSearch1")
Response.Write(input name="strSearch2")

Response.End


Can you tell me what the code should be to display the values the user input and where this code should go?

Here's my code as it is now ..


Code:
<% @ LANGUAGE="VBScript" %>
<%

Option Explicit
Response.Buffer = True

Const adOpenForwardOnly = 0
Const adLockReadOnly = 1
Const adUseClient = 3
Const adCmdText = 1


 Dim conn, rs, sql
 Dim strURL     ' The URL of this page so the form will work
 ' Retreive the URL of this page from Server Variables
strURL = Request.ServerVariables("URL") 
Dim rstSearch  ' ADO recordset
Dim strSearch  ' The text being looked for
Dim strSearch1  ' The text being looked for
Dim strSearch2  ' The text being looked for
 



strSearch = Request.Form("search")


 Set conn = Server.CreateObject("ADODB.Connection")
 conn.open("RSA_262093")
%>

<%

'*************************************************  ****************************
' HIGHLIGHT function will search text for a specific string
' When string is found it will be surrounded by supplied strings
'
' NOTE: Unfortunately Replace() function does not preserve the original case 
' of the found string. This function does.
'
' Parameters:
' strText 	- string to search in
' strFind	- string to look for
' strBefore	- string to insert before the strFind
' strAfter 	- string to insert after the strFind
'
' Example: 
' This will make all the instances of the word "the" bold
'
' Response.Write Highlight(strSomeText, "the", "<b>", "</b>")
'
Function Highlight(strText, strFind, strBefore, strAfter)
	Dim nPos
	Dim nLen
	Dim nLenAll
	
	nLen = Len(strFind)
	nLenAll = nLen + Len(strBefore) + Len(strAfter) + 1

	Highlight = strText

	If nLen > 0 And Len(Highlight) > 0 Then
		nPos = InStr(1, Highlight, strFind, 1)
		Do While nPos > 0
			Highlight = Left(Highlight, nPos - 1) & _
				strBefore & Mid(Highlight, nPos, nLen) & strAfter & _
				Mid(Highlight, nPos + nLen)

			nPos = InStr(nPos + nLenAll, Highlight, strFind, 1)
		Loop
	End If
End Function


'*************************************************  ****************************
%>




<html> 
<body bgcolor="#FFFFFF">



<p><B>Search and/or Update a Candidates' Record by the Resume Document field</B></p>  
<p></p>
<form action="<%= strURL %>" method="post">
<input name="search" value="<%= strSearch %>" />
<p>


<p><B>Enter a second key word you want to search for or % in the text box below</B></p>  
<p></p>

<input name="search1" value="<%= strSearch1 %>" />
<p>



<p><B>Enter a third key word you want to search for or % in the text box below</B></p>  
<p></p>

<input name="search2" value="<%= strSearch2 %>" />
<p>



<input type="submit" />
</p>
</form>
<p></p>

 
<% 
If strSearch <> "" Then
 Set rs = Server.CreateObject("ADODB.Recordset") 

 sql = "SELECT * FROM [RSA_Candidates] WHERE 1 = 1 " 

If Len(Trim(Request.Form("strSearch"))) > 0 Then sql = sql & "AND resume_doc LIKE '%"& Replace(Request.Form("strSearch"), "'", 

"''") & "%' "
If Len(Trim(Request.Form("strSearch1"))) > 0 Then sql = sql & "AND resume_doc LIKE '%"& Replace(Request.Form("strSearch1"), "'", 

"''") & "%' "
If Len(Trim(Request.Form("strSearch2"))) > 0 Then sql = sql & "AND resume_doc LIKE '%"& Replace(Request.Form("strSearch2"), "'", 

"''") & "%' "

sql = sql & " ORDER BY lastname;"



Response.Write(sql)

Response.Write(input name="strSearch")
Response.Write(input name="strSearch1")
Response.Write(input name="strSearch2")

Response.End

  
    
 rs.Open sql, conn, adOpenForwardOnly, adLockReadOnly, adCmdText
%> 


<%
IF not Rs.EOF then
 Do While not Rs.EOF


Dim memoVal
memoVal = rs.Fields("resume_doc")
Session("search") = Request.Form("strSearch")
Session("search1") = Request.Form("strSearch1")
Session("search2") = Request.Form("strSearch2")

Response.Write "<FORM name='Update' method='post' action='UpdateT.asp'>" 

Response.Write "<table border=1 cellspacing=2>" 

 

 
   Response.Write ("<tr>") 
    Response.Write("<td colspan='1' align='center'>"&"<input type ='submit' name='submit' value='Update' >"&"</td>")
    Response.Write ("<td>" & " <input type='radio' name='ID' value=" & rs("ID") & "></td>") 
    Response.Write ("<td>" & "<B>"  & "Last Name: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("LastName")  & "</td>") 

    Response.Write ("<td>" & "<B>"  & "First Name: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("FirstName")  & "</td>") 
  
    Response.Write ("<td>" & "<B>"  & "MI: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("MI")  & "</td>") 

    Response.Write ("<td>" & "<B>"  & "Title: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("title")  & "</td>")
    
    Response.Write ("<td>" & "<B>"  & "Company: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("Company")  & "</td>")

 
    Response.Write "<table border=1 cellspacing=2>" 
   Response.Write ("<tr>") 
    Response.Write ("<td>" & "<B>"  & "Client: " & "</B>" & "</td>") 
    Response.Write ("<td> <font color='#FF0000'>" & rs("Client")  & " </font></td>")
    Response.Write ("<td rowspan=21 valign='top'>" & rs("Notes") & "</td>") 
    Response.Write ("</tr>") 


   Response.Write ("<tr>") 
    Response.Write ("<td>" & "<B>"  & "Industry: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("industry")  & "</td>")
    Response.Write ("</tr>")


    Response.Write ("<tr>") 
    Response.Write ("<td>" & "<B>"  & "Discipline: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("discipline")  & "</td>")
    Response.Write ("</tr>") 

   Response.Write ("<tr>") 
    Response.Write ("<td>" & "<B>"  & "Compensation: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("compensation")  & "</td>")
    Response.Write ("</tr>") 
  
   Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Cell Phone: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("cell_phone")  & "</td>")
   Response.Write ("</tr>") 

    Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Office Phone: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("office_phone")  & "</td>")
   Response.Write ("</tr>") 

    Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Home Phone: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("home_phone")  & "</td>")
   Response.Write ("</tr>") 

   Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Fax: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("fax")  & "</td>")
   Response.Write ("</tr>") 

    Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Email: " & "</B>" & "</td>")
     Response.Write ("<td><A HREF=mailto:"& rs("email") & "> "& rs("email") &" </A></td>")
   Response.Write ("</tr>") 
   

   Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Address: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("address")  & "</td>")
   Response.Write ("</tr>")    


   Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "City: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("City")  & "</td>")
   Response.Write ("</tr>") 

   Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "State: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("state")  & "</td>")
   Response.Write ("</tr>") 

  Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Zip: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("zip")  & "</td>")
   Response.Write ("</tr>") 


  Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Relocation: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("Relocation")  & "</td>")
   Response.Write ("</tr>") 


   Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Education: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("Education")  & "</td>")
   Response.Write ("</tr>") 


  Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Affiliations: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("Affiliations")  & "</td>")
   Response.Write ("</tr>") 

  
  Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Refered By: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("Refer_by")  & "</td>")
   Response.Write ("</tr>") 
  
   Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Resume on File: " & "</B>" & "</td>")
    Response.Write ("<td><A HREF=http://www.rsaexecsearch.com/rsa/resumes/" & rs("Resume")  & "> "& rs("Resume") &"</A></td>")
   Response.Write ("</tr>") 

   Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "References: " & "</B>" & "</td>")
    Response.Write ("<td><A HREF=http://www.rsaexecsearch.com/rsa/references/" & rs("References")  & "> "& rs("References") 

&"</A></td>")
   Response.Write ("</tr>")
  



   Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Date of First Entry: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("Date_first_entry")  & "</td>")
   Response.Write ("</tr>") 


  Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Date of Last Entry: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("Date_last_entry")  & "</td>")
   Response.Write ("</tr>") 


 Response.Write "<table border=1 cellspacing=2>"
   Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Resume: " & "</B>" & "</td>")
   Response.Write ("<td>" &  memoVal & "</td>")
   Response.Write ("</tr>") 



   Response.Write ("<tr>") 
     Response.Write ("<td BGCOLOR=#ffff00 colspan=5>&nbsp;</td>")
      
   Response.Write ("</tr>") 
      



    Response.Write ("</tr>") 
    Rs.MoveNext
Loop 
else 
   Response.Write("No records found")
end if
 
Response.Write "</table>" 
Response.Write "</table>" 
Rs.Close 
Set Rs = Nothing 
Set Conn = Nothing 
End If
%> 
</form> 
</body> 
</html> 


I apologize but I'm not that familiar with asp. Thank you for your help and patience. I'm pretty frustrated with this...
Thanks!

Reply With Quote
  #44  
Old October 29th, 2009, 11:18 AM
sync_or_swim's Avatar
sync_or_swim sync_or_swim is offline
Moderator
Click here for more information.
 
Join Date: Mar 2006
Location: South Wales
Posts: 3,461 sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level) 
Time spent in forums: 2 Months 1 Day 16 h 50 m 26 sec
Reputation Power: 1806
You need to change the lines as per my highlights, I had set it up to look for strSearch, strSearch2 etc, but it should be search, search1 and search2:
Code:
If Len(Trim(Request.Form("search"))) > 0 Then sql = sql & "AND resume_doc LIKE '%"& Replace(Request.Form("search"), "'", "''") & "%' "
If Len(Trim(Request.Form("search1"))) > 0 Then sql = sql & "AND resume_doc LIKE '%"& Replace(Request.Form("search1"), "'", "''") & "%' "
If Len(Trim(Request.Form("search2"))) > 0 Then sql = sql & "AND resume_doc LIKE '%"& Replace(Request.Form("search2"), "'", "''") & "%' "

sql = sql & " ORDER BY lastname;"

Reply With Quote
  #45  
Old October 29th, 2009, 12:32 PM
igidttam igidttam is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Oct 2009
Posts: 26 igidttam User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 23 m 27 sec
Reputation Power: 0
I made the change and entered keywords html, unix and sql.
Yes the code is picking up the keywords. Here's what appeared on the screen..


Quote:
SELECT * FROM [RSA_Candidates] WHERE 1 = 1 AND resume_doc LIKE '%html%' AND resume_doc LIKE '%unix%' AND resume_doc LIKE '%sql%' ORDER BY lastname;



Here's the code now ...


Code:
<% @ LANGUAGE="VBScript" %>
<%

Option Explicit
Response.Buffer = True

Const adOpenForwardOnly = 0
Const adLockReadOnly = 1
Const adUseClient = 3
Const adCmdText = 1


 Dim conn, rs, sql
 Dim strURL     ' The URL of this page so the form will work
 ' Retreive the URL of this page from Server Variables
strURL = Request.ServerVariables("URL") 
Dim rstSearch  ' ADO recordset
Dim strSearch  ' The text being looked for
Dim strSearch1  ' The text being looked for
Dim strSearch2  ' The text being looked for
 



strSearch = Request.Form("search")


 Set conn = Server.CreateObject("ADODB.Connection")
 conn.open("RSA_262093")
%>

<%

'*************************************************  ****************************
' HIGHLIGHT function will search text for a specific string
' When string is found it will be surrounded by supplied strings
'
' NOTE: Unfortunately Replace() function does not preserve the original case 
' of the found string. This function does.
'
' Parameters:
' strText 	- string to search in
' strFind	- string to look for
' strBefore	- string to insert before the strFind
' strAfter 	- string to insert after the strFind
'
' Example: 
' This will make all the instances of the word "the" bold
'
' Response.Write Highlight(strSomeText, "the", "<b>", "</b>")
'
Function Highlight(strText, strFind, strBefore, strAfter)
	Dim nPos
	Dim nLen
	Dim nLenAll
	
	nLen = Len(strFind)
	nLenAll = nLen + Len(strBefore) + Len(strAfter) + 1

	Highlight = strText

	If nLen > 0 And Len(Highlight) > 0 Then
		nPos = InStr(1, Highlight, strFind, 1)
		Do While nPos > 0
			Highlight = Left(Highlight, nPos - 1) & _
				strBefore & Mid(Highlight, nPos, nLen) & strAfter & _
				Mid(Highlight, nPos + nLen)

			nPos = InStr(nPos + nLenAll, Highlight, strFind, 1)
		Loop
	End If
End Function


'*************************************************  ****************************
%>




<html> 
<body bgcolor="#FFFFFF">



<p><B>Search and/or Update a Candidates' Record by the Resume Document field</B></p>  
<p></p>
<form action="<%= strURL %>" method="post">
<input name="search" value="<%= strSearch %>" />
<p>


<p><B>Enter a second key word you want to search for or % in the text box below</B></p>  
<p></p>

<input name="search1" value="<%= strSearch1 %>" />
<p>



<p><B>Enter a third key word you want to search for or % in the text box below</B></p>  
<p></p>

<input name="search2" value="<%= strSearch2 %>" />
<p>



<input type="submit" />
</p>
</form>
<p></p>

 
<% 
If strSearch <> "" Then
 Set rs = Server.CreateObject("ADODB.Recordset") 

 sql = "SELECT * FROM [RSA_Candidates] WHERE 1 = 1 " 

If Len(Trim(Request.Form("search"))) > 0 Then sql = sql & "AND resume_doc LIKE '%"& Replace(Request.Form("search"), "'", "''") & 

"%' "
If Len(Trim(Request.Form("search1"))) > 0 Then sql = sql & "AND resume_doc LIKE '%"& Replace(Request.Form("search1"), "'", "''") 

& "%' "
If Len(Trim(Request.Form("search2"))) > 0 Then sql = sql & "AND resume_doc LIKE '%"& Replace(Request.Form("search2"), "'", "''") 

& "%' "

sql = sql & " ORDER BY lastname;"



Response.Write(sql)



Response.End

  
    
 rs.Open sql, conn, adOpenForwardOnly, adLockReadOnly, adCmdText
%> 


<%
IF not Rs.EOF then
 Do While not Rs.EOF


Dim memoVal
memoVal = rs.Fields("resume_doc")
Session("search") = Request.Form("strSearch")
Session("search1") = Request.Form("strSearch1")
Session("search2") = Request.Form("strSearch2")

Response.Write "<FORM name='Update' method='post' action='UpdateT.asp'>" 

Response.Write "<table border=1 cellspacing=2>" 

 

 
   Response.Write ("<tr>") 
    Response.Write("<td colspan='1' align='center'>"&"<input type ='submit' name='submit' value='Update' >"&"</td>")
    Response.Write ("<td>" & " <input type='radio' name='ID' value=" & rs("ID") & "></td>") 
    Response.Write ("<td>" & "<B>"  & "Last Name: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("LastName")  & "</td>") 

    Response.Write ("<td>" & "<B>"  & "First Name: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("FirstName")  & "</td>") 
  
    Response.Write ("<td>" & "<B>"  & "MI: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("MI")  & "</td>") 

    Response.Write ("<td>" & "<B>"  & "Title: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("title")  & "</td>")
    
    Response.Write ("<td>" & "<B>"  & "Company: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("Company")  & "</td>")

 
    Response.Write "<table border=1 cellspacing=2>" 
   Response.Write ("<tr>") 
    Response.Write ("<td>" & "<B>"  & "Client: " & "</B>" & "</td>") 
    Response.Write ("<td> <font color='#FF0000'>" & rs("Client")  & " </font></td>")
    Response.Write ("<td rowspan=21 valign='top'>" & rs("Notes") & "</td>") 
    Response.Write ("</tr>") 


   Response.Write ("<tr>") 
    Response.Write ("<td>" & "<B>"  & "Industry: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("industry")  & "</td>")
    Response.Write ("</tr>")


    Response.Write ("<tr>") 
    Response.Write ("<td>" & "<B>"  & "Discipline: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("discipline")  & "</td>")
    Response.Write ("</tr>") 

   Response.Write ("<tr>") 
    Response.Write ("<td>" & "<B>"  & "Compensation: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("compensation")  & "</td>")
    Response.Write ("</tr>") 
  
   Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Cell Phone: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("cell_phone")  & "</td>")
   Response.Write ("</tr>") 

    Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Office Phone: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("office_phone")  & "</td>")
   Response.Write ("</tr>") 

    Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Home Phone: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("home_phone")  & "</td>")
   Response.Write ("</tr>") 

   Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Fax: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("fax")  & "</td>")
   Response.Write ("</tr>") 

    Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Email: " & "</B>" & "</td>")
     Response.Write ("<td><A HREF=mailto:"& rs("email") & "> "& rs("email") &" </A></td>")
   Response.Write ("</tr>") 
   

   Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Address: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("address")  & "</td>")
   Response.Write ("</tr>")    


   Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "City: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("City")  & "</td>")
   Response.Write ("</tr>") 

   Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "State: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("state")  & "</td>")
   Response.Write ("</tr>") 

  Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Zip: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("zip")  & "</td>")
   Response.Write ("</tr>") 


  Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Relocation: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("Relocation")  & "</td>")
   Response.Write ("</tr>") 


   Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Education: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("Education")  & "</td>")
   Response.Write ("</tr>") 


  Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Affiliations: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("Affiliations")  & "</td>")
   Response.Write ("</tr>") 

  
  Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Refered By: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("Refer_by")  & "</td>")
   Response.Write ("</tr>") 
  
   Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Resume on File: " & "</B>" & "</td>")
    Response.Write ("<td><A HREF=http://www.rsaexecsearch.com/rsa/resumes/" & rs("Resume")  & "> "& rs("Resume") &"</A></td>")
   Response.Write ("</tr>") 

   Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "References: " & "</B>" & "</td>")
    Response.Write ("<td><A HREF=http://www.rsaexecsearch.com/rsa/references/" & rs("References")  & "> "& rs("References") 

&"</A></td>")
   Response.Write ("</tr>")
  



   Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Date of First Entry: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("Date_first_entry")  & "</td>")
   Response.Write ("</tr>") 


  Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Date of Last Entry: " & "</B>" & "</td>")
    Response.Write ("<td>" & rs("Date_last_entry")  & "</td>")
   Response.Write ("</tr>") 


 Response.Write "<table border=1 cellspacing=2>"
   Response.Write ("<tr>") 
   Response.Write ("<td>" & "<B>"  & "Resume: " & "</B>" & "</td>")
   Response.Write ("<td>" &  memoVal & "</td>")
   Response.Write ("</tr>") 



   Response.Write ("<tr>") 
     Response.Write ("<td BGCOLOR=#ffff00 colspan=5>&nbsp;</td>")
      
   Response.Write ("</tr>") 
      



    Response.Write ("</tr>") 
    Rs.MoveNext
Loop 
else 
   Response.Write("No records found")
end if
 
Response.Write "</table>" 
Response.Write "</table>" 
Rs.Close 
Set Rs = Nothing 
Set Conn = Nothing 
End If
%> 
</form> 
</body> 
</html> 


I'm thinking the issue must be in the response.write statement for the resume_doc field. Correct?

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingASP Development > Multiple keyword search on one database field


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump





 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 4 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek