nutype
08-04-2004, 02:36 AM
Ok I know I'm probably missing something very simple but I need help!
Basically I'm trying to get this search function to work with my flash. When you type a value in flash and the asp outputs the results. Flash then pulls the results and displays them. This just has to work with duplicate results (such as 2 ppl with the same last name).
I can get the search function to work however it only pulls one record not all matching ones.
Sorry if I sound like a muppet, I'm a bit green to ASP. Please help!
Code:
<%@Language="VBScript"%>
<%
Dim employees
Dim oConn
Set employees = Server.CreateObject("ADODB.Recordset")
Set oConn = Server.CreateObject("ADODB.Connection")
oConn.ConnectionString = "AllAsText=0;ApplicationUsingThreads=1;Driver=FileM aker Pro;FetchChunkSize=100;FileOpenCache=0;IntlSort=0; MaxTextlength=255;ServerAddress=127.0.0.1;Translat ionOption=0;UseRemoteConnection=1" & Server.MapPath("employees.fp5")
oConn.Open
employees.Open "SELECT * FROM Employees", oConn, 2, 3
employees.Find "NameLast = '" & UCase(Request.QueryString("strSearch")) & "'"
If employees.EOF Then
Response.Write "NameLast=Not+Found&NameFirst=Not+Found&Position=Not+Found"
Else
Response.Write "NameFirst=" & Server.URLEncode(employees("NameFirst")) & "&NameLast=" & Server.URLEncode(employees("NameLast")) & "&Position=" & Server.URLEncode(employees("Position"))
End If
employees.Close
Set employees = Nothing
oConn.Close
Set oConn = Nothing
%>
Basically I'm trying to get this search function to work with my flash. When you type a value in flash and the asp outputs the results. Flash then pulls the results and displays them. This just has to work with duplicate results (such as 2 ppl with the same last name).
I can get the search function to work however it only pulls one record not all matching ones.
Sorry if I sound like a muppet, I'm a bit green to ASP. Please help!
Code:
<%@Language="VBScript"%>
<%
Dim employees
Dim oConn
Set employees = Server.CreateObject("ADODB.Recordset")
Set oConn = Server.CreateObject("ADODB.Connection")
oConn.ConnectionString = "AllAsText=0;ApplicationUsingThreads=1;Driver=FileM aker Pro;FetchChunkSize=100;FileOpenCache=0;IntlSort=0; MaxTextlength=255;ServerAddress=127.0.0.1;Translat ionOption=0;UseRemoteConnection=1" & Server.MapPath("employees.fp5")
oConn.Open
employees.Open "SELECT * FROM Employees", oConn, 2, 3
employees.Find "NameLast = '" & UCase(Request.QueryString("strSearch")) & "'"
If employees.EOF Then
Response.Write "NameLast=Not+Found&NameFirst=Not+Found&Position=Not+Found"
Else
Response.Write "NameFirst=" & Server.URLEncode(employees("NameFirst")) & "&NameLast=" & Server.URLEncode(employees("NameLast")) & "&Position=" & Server.URLEncode(employees("Position"))
End If
employees.Close
Set employees = Nothing
oConn.Close
Set oConn = Nothing
%>