Home > ASP Development > Parts Drop Down Search

Parts Drop Down Search



I'm trying to create a part search for mufflers. I would like to do drop downs ex.



Year

- Make

- Model

- Engine



the end result would bring up the part they are looking for and it would link to that part. Kind of similar to a appsearch.aspx



I'm unsure would would work best with this, so if someone could point me in the right direction, that would be awesome!



Thanks



-Edit

i forgot that i will be doing these search's from csv files.

    
Guest


this link will explain to you how its done in asp

http://www.asp101.com/samples/db_pulldown_linked.asp

Was this answer helpful ? Yes No   
Guest


Here is a similar example

http://computer-helpforum.com/asp/a...nt_dropdown.asp

See attachment



Once you get the basics done you can make it a bit more user friendly using Javascript or Ajax



http://computer-helpforum.com/asp/select.asp

http://computer-helpforum.com/asp/a...ct_via_ajax.asp

Was this answer helpful ? Yes No   
Guest


thanks for the help guys. i'll rip apart this code and see what i can come up with.

Was this answer helpful ? Yes No   
Guest


ok, i'm trying to pull this data from an access database, let me know if i'm on the right path.



from the year drop down you select the year of your car

after selecting the year of your car, it displays the different manufacturers

once you select your manufacturer it displays an engine type then you select the engine type and it opens up a new window or in the same the different parts that will work for that specific car.



as far as the asp coding goes, i have a little start with what you guys gave me from before.




Code:


<% parts = Split(Request.ServerVariables("PATH_TRANSLATED"),"\")
For x=0 To Ubound(parts)-1
path = path & parts(x) & "\"
Next
MM_Cars_STRING = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & path & "cars.mdb"

Set rsManufacturer = Server.CreateObject("ADODB.Recordset")
rsManufacturer.ActiveConnection = MM_Cars_STRING
rsManufacturer.Source = "SELECT year_id, manufacturer FROM manufacturer ORDER BY manufacturer_name ASC"
rsManufacturer.Open()

rsModel__MMColParam = "-1"
If (Request.QueryString("manufacturer_id") <> "") Then
rsModel__MMColParam = Request.QueryString("manufacturer_id")
End If

Set rsModel = Server.CreateObject("ADODB.Recordset")
rsModel.ActiveConnection = MM_Cars_STRING
rsModel.Source = "SELECT model_id, model_name FROM model WHERE manufacturer_id = " + Replace(rsModel__MMColParam, "'", "''") + " ORDER BY model_name ASC"
rsModel.CursorType = 0
rsModel.CursorLocation = 2
rsModel.LockType = 1
rsModel.Open()
%>



Was this answer helpful ? Yes No   
Guest


The queries would depend on your database setup and fieldnames.

Was this answer helpful ? Yes No   
Guest


ok, from what i just found out is that an access database isn't going to work for this.



i need to be able to search multipule excel files from one asp page.



does anyone have some good resources for this?

Was this answer helpful ? Yes No   
Guest


ok i downloaded this file

Excel Spreadsheet Database



i changed around some of the connections strings and i'm getting this error



Microsoft OLE DB Provider for ODBC Drivers error '80040e10'



[Microsoft][ODBC Excel Driver] Too few parameters. Expected 1.



/searchengine/exceldbase/show_exceldb_combo.asp, line 18





line 18 is rs.Open strSql, connXLS




Code:



<%@ LANGUAGE=VBSCRIPT %>
<%Option Explicit%>

<%
DIM connXLS, strPath, strPathFile, rs, strSql, CustomerArray, ct, c, strAddDetails, a
strAddDetails = 1
Set connXLS = Server.CreateObject("ADODB.connection")
strPathFile = "kandndb.xls"
strPath = ""
connXLS.Open "Driver={Microsoft Excel Driver (*.xls)}; DriverId=790;DBQ=" & Server.MapPath(strPathFile) & ";DefaultDir =" & Server.MapPath(strPathFile) & ";"
'connXLS.Open "Driver={Microsoft Excel Driver (*.xls)}; DriverId=790;DBQ=C:\excel_db\excel_data.xls;Defaul tDir = C:\excel_db\"
Set rs = Server.CreateObject("ADODB.recordset")

strSql = "SELECT fldyear, fldmake, fldmodel, fldengine_type,fldpart_num" _
& " FROM partssearch" _
& " ORDER BY fldyear"
rs.Open strSql, connXLS

CustomerArray = rs.GetRows()
ct = Ubound(CustomerArray,2)

rs.Close
connXLS.Close
set rs = nothing
set connXLS = nothing

strAddDetails = 2
%>



Was this answer helpful ? Yes No   
Guest
 
 
Home - About Infoqu - Contact - Privacy Statement - Link to Infoqu - Bookmark Infoqu

Copyright 2007-2008 by Infoqu. All rights reserved