<% Dim searchString searchString = Request.Form("search") %> Globe Electronics

<% If instr(UCASE(searchString),"HAND") > 0 Then strProductType = "handles" ElseIf instr(UCASE(searchString),"SPACE") > 0 Then strProductType = "spacers" ElseIf instr(UCASE(searchString),"STAND") > 0 Then strProductType = "standoffs" ElseIf instr(UCASE(searchString),"WASH") > 0 Then strProductType = "washers" ElseIf instr(UCASE(searchString),"SCRE") > 0 Then strProductType = "screws" ElseIf instr(UCASE(searchString),"RETAI") > 0 Then strProductType = "retainers" ElseIf instr(UCASE(searchString),"THUMB") > 0 Then strProductType = "thumbnuts" End If Set cn = Server.CreateObject("ADODB.Connection") Set rs = Server.CreateObject("ADODB.Recordset") cn.ConnectionTimeout = 0 cn.CommandTimeout = 0 cn.open Session("strConnection") PartNumberSearch = UCASE(Replace(searchString,"-","")) SQLHandlesPart = "select partnumber,type,subtype,Diameter from handles where Replace(partnumber,'-','') = '" & PartNumberSearch & "'" SQLHandlesPart_M = "select partnumber,type,subtype,Diameter from handles_M where Replace(partnumber,'-','') = '" & PartNumberSearch & "'" SQLSpacersPart = "select partnumber,type,Diameter from spacers where Replace(partnumber,'-','') = '" & PartNumberSearch & "'" SQLSpacersPart_M = "select partnumber,type,Diameter from spacers_M where Replace(partnumber,'-','') = '" & PartNumberSearch & "'" SQLStandoffsPart = "select partnumber,type,Diameter from standoffs where Replace(partnumber,'-','') = '" & PartNumberSearch & "'" SQLStandoffsPart_M = "select partnumber,type,Diameter from standoffs_M where Replace(partnumber,'-','') = '" & PartNumberSearch & "'" SQLWashers = "select partnumber,type from washers where Replace(partnumber,'-','') = '" & PartNumberSearch & "'" SQLScrews = "select partnumber,type,subtype,thread from screws where Replace(partnumber,'-','') = '" & PartNumberSearch & "'" SQLRetainers = "select partnumber,type,thread from retainers where Replace(partnumber,'-','') = '" & PartNumberSearch & "'" SQLThumbnuts = "select partnumber,type from thumbnuts where Replace(partnumber,'-','') = '" & PartNumberSearch & "'" Set rs = cn.execute(SQLHandlesPart) If NOT rs.EOF Then Response.redirect "/handles.asp?product=st_handles&type=" & rs("type") & "&subtype=" & rs("subtype") & "&Diameter=" & rs("Diameter") & "&productId=" & rs("partnumber") End If Set rs = cn.execute(SQLHandlesPart_M) If NOT rs.EOF Then Response.redirect "/metrichandles.asp?product=mt_handles&type=" & rs("type") & "&subtype=" & rs("subtype") & "&Diameter=" & rs("Diameter") & "&productId=" & rs("partnumber") End If Set rs = cn.execute(SQLSpacersPart) If NOT rs.EOF Then Response.redirect "/spacers.asp?product=st_spacers&type=" & rs("type") & "&Diameter=" & rs("Diameter") & "&productId=" & rs("partnumber") End If Set rs = cn.execute(SQLSpacersPart_M) If NOT rs.EOF Then Response.redirect "/metricspacers.asp?product=mt_spacers&type=" & rs("type") & "&Diameter=" & rs("Diameter") & "&productId=" & rs("partnumber") End If Set rs = cn.execute(SQLStandoffsPart) If NOT rs.EOF Then Response.redirect "/standoffs.asp?product=st_standoffs&type=" & rs("type") & "&Diameter=" & rs("Diameter") & "&productId=" & rs("partnumber") End If Set rs = cn.execute(SQLStandoffsPart_M) If NOT rs.EOF Then Response.redirect "/metricstandoffs.asp?product=mt_standoffs&type=" & rs("type") & "&Diameter=" & rs("Diameter") & "&productId=" & rs("partnumber") End If Set rs = cn.execute(SQLWashers) If NOT rs.EOF Then Response.redirect "/washers.asp?type=" & rs("type") & "&productId=" & rs("partnumber") End If Set rs = cn.execute(SQLScrews) If NOT rs.EOF Then Response.redirect "/screws.asp?product=st_screws&type=" & rs("type") & "&subtype=" & rs("subtype") & "&thread=" & rs("thread") & "&productId=" & rs("partnumber") End If Set rs = cn.execute(SQLRetainers) If NOT rs.EOF Then Response.redirect "/retainers.asp?product=st_retainers&type=" & rs("type") & "&thread=" & rs("thread") & "&productId=" & rs("partnumber") End If Set rs = cn.execute(SQLThumbnuts) If NOT rs.EOF Then Response.redirect "/thumbnuts.asp?type=" & rs("type") & "&productId=" & rs("partnumber") End If searchString = Replace(searchString," "," OR ") SQLHandles_st = "select Distinct Type from handles where CONTAINS (*,'" & searchString & "')" SQLHandles_mt = "select Distinct Type from handles_M where CONTAINS (*,'" & searchString & "')" SQLSpacers_st = "select Distinct Type from spacers where CONTAINS(*,'" & searchString & "')" SQLSpacers_mt = "select Distinct Type from spacers_M where CONTAINS(*,'" & searchString & "')" SQLStandoffs_st = "select Distinct Type from standoffs where CONTAINS(*,'" & searchString & "')" SQLStandoffs_mt = "select Distinct Type from standoffs_M where CONTAINS(*,'" & searchString & "')" SQLWashers = "select Distinct Type from washers where CONTAINS(*,'" & searchString & "')" SQLScrews = "select Distinct Type from screws where CONTAINS(*,'" & searchString & "')" SQLRetainers = "select Distinct Type from retainers where CONTAINS(*,'" & searchString & "')" SQLThumbnuts = "select Distinct Type from thumbnuts where CONTAINS(*,'" & searchString & "')" If strProductType = "handles" or strProductType = "" Then Set rs = cn.execute(SQLHandles_st) If NOT rs.EOF Then Response.write "Standard Handles
" End If While NOT rs.EOF Response.write "" & rs("Type") & "
" rs.MoveNext Wend Set rs = cn.execute(SQLHandles_mt) If NOT rs.EOF Then Response.write "Metric Handles
" End If While NOT rs.EOF Response.write "" & rs("Type") & "
" rs.MoveNext Wend End If If strProductType = "spacers" or strProductType = "" Then Set rs = cn.execute(SQLSpacers_st) If NOT rs.EOF Then Response.write "Standard Spacers
" End If While NOT rs.EOF Response.write "" & rs("Type") & "
" rs.MoveNext Wend Set rs = cn.execute(SQLSpacers_mt) If NOT rs.EOF Then Response.write "Metric Spacers
" End If While NOT rs.EOF Response.write "" & rs("Type") & "
" rs.MoveNext Wend End If If strProductType = "standoffs" or strProductType = "" Then Set rs = cn.execute(SQLStandoffs_st) If NOT rs.EOF Then Response.write "Standard Standoffs
" End If While NOT rs.EOF Response.write "" & rs("Type") & "
" rs.MoveNext Wend Set rs = cn.execute(SQLStandoffs_mt) If NOT rs.EOF Then Response.write "Metric Standoffs
" End If While NOT rs.EOF Response.write "" & rs("Type") & "
" rs.MoveNext Wend End If If strProductType = "washers" or strProductType = "" Then Set rs = cn.execute(SQLWashers) If NOT rs.EOF Then Response.write "Washers
" End If While NOT rs.EOF Response.write "" & rs("Type") & "
" rs.MoveNext Wend End If If strProductType = "screws" or strProductType = "" Then Set rs = cn.execute(SQLScrews) If NOT rs.EOF Then Response.write "Screws
" End If While NOT rs.EOF Response.write "" & rs("Type") & "
" rs.MoveNext Wend End If If strProductType = "retainers" or strProductType = "" Then Set rs = cn.execute(SQLRetainers) If NOT rs.EOF Then Response.write "Retainers
" End If While NOT rs.EOF Response.write "" & rs("Type") & "
" rs.MoveNext Wend End If If strProductType = "thumbnuts" or strProductType = "" Then Set rs = cn.execute(SQLThumbnuts) If NOT rs.EOF Then Response.write "Thumbnuts
" End If While NOT rs.EOF Response.write "" & rs("Type") & "
" rs.MoveNext Wend End If %>

Home  | On-Line Catalog | About Us | Request  a Catalog | RoHS Compliance Statement | Resellers | Engineering DataContact Us
Sitemap