<%@ Language=VBScript %> <% dim querySQL 'SQL dim odbcCon 'ODBC connection dim queryRS 'RecordSet dim numbrecord 'Number of records dim queryIDNum dim archSpec archSpec = Request("arch") dim numFamSpecificDropdowns numFamSpecificDropdowns = 4 dim zz dim rootAt rootAt = "../../" Response.Write InitialisePage(rootAt) dim Name if Name <> "" then Name = name else Name = session("sName") dim Email if Email <> "" then Email = email else Email = session("sEmail") 'put error detection here On Error Resume Next 'For when incorrect data is entered e.g. text in number fields %> COMSOL - Parametric micro-search <% ShowPageTitle() %>

Self Selection Micro-Search <% if archSpec = "8051" then %>for 8051<% else if archSpec = "HC08" then %>for HC08<% end if end if %>


<% if Request("Submit.x") = "" then 'The form has not been submitted, so we just need to output the form and 'wait for the results %>

Your search details will be held in our database and can be re-run at any time afterwards. Although the password provides some security if this is of paramount concern please contact us and we will run the search for you off line. * Indicates a field that must be filled in.

Remember once you have created your report you can sort it by selecting the title of any of the headings - first selection sorts it ascending subsequent selection sorts it descending.

Note: Not selecting a parameter (no tick in the 'Show' column) does not remove it from the search criteria. You must make sure that any unwanted limitations on parameters ('Query details' column) are cleared.

Jump to end
Show Property Query details
Your name: *
Your e-mail address: *
A description of this search: *
A password to access your results: *
Bus width

Return only chips which are:

<% if archSpec = "8051" then %>

8-bit

<% else 'ADD MORE IF...ELSEs here to specify what will appear for other architecture 'types. AT the moment only 8051 is trapped. %>

8-bit: 16-bit: 32-bit: DSP:

<% end if %>
Chip family

Return only chips from families:

<% if archSpec = "8051" then %> 8051 <% else 'AND HERE %>

8051: ARM: PIC:

<% end if %>
Amount of ROM

Show only chips with

More than or exactly Less than Exactly
Bytes Bytes Bytes
ROM type
ROM Type Is required Will accept
  any selected on right
ROMless only
Mask programmable only
One-time programmable only
EPROM only
Electronically programmable EPROM only
Multi-write flash (EEPROM) only
One-time programmable flash only
Factory programmed flash only
In-situ programmable flash only
In-situ application programmable flash only
Piggy-backable only
NVRAM only
Amount of RAM

Show only chips with

More than or exactly Less than Exactly
Bytes Bytes Bytes
External memory

Return only chips with a minimum of:

0KB   64KB 128KB

Timers/counters

at least

Watchdog Required
External interrupts

Show only chips with

More than or exactly Less than Exactly
I/O bits

at least

Number of UARTs

at least

Number of ADCs

at least

ADC resolution

at least

PWM

at least

Maximum current (in mA)

at least

Frequency at which
current measured
Minimum clock speed (in Mhz)

must be less than

Maximum clock speed (in Mhz)

at least

Equivalent Maximum speed (in Mhz)

at least

Low power features Required
Clock types
Clock Type Is required Will accept
  any selected on right
Crystal only
RC only
Ceramic only
External only
LC only
PLL only
Manufacturing process
Packaging
Packaging Type Is required Will accept
  any selected on right
DIP only
SDIP only
LCC only
QFP only
SSOP only
VSO only
MLP only
SOIC only
PSO only
BGA only
SO only
ECP only
SIMM only
QFN only
Additional features (click here for details)
<%if archSpec="8051" then %>
Feature Is required Feature Is required
CAPCOM >1 Data Pointers
PCM >1 Interrupt Priorities
<%end if%> <% 'open database connection set odbcCon = Server.CreateObject("ADODB.Connection") odbcCon.Open dsnMicrosearch Set queryRS = Server.CreateObject("ADODB.RecordSet") 'get list of features that are only relevant to this architecture queryRS.Open "SELECT * FROM tblFeature WHERE featureFamRelevance Like '%" & archSpec & "%'",odbcCon,2,2 'you can change numFamSpecificDropdowns at the top of this script. 'changes will be reflected throughout the script. Easy :) for zz=1 to numFamSpecificDropdowns %>
<% queryRS.MoveFirst next %>
Chip manufacturers
Address of chip datasheet




  Jump to Top <% else 'form has been submitted 'Just got the form results, so form a query out of it dim sqlquery dim engquery dim engquerypre dim needtick dim innertick dim innercondition sqlquery = "SELECT [tblChips].[cpChipNumber]" engquerypre = "Find all chips satisfying the following criteria:" & _ vbnewline & vbnewline engquery = "showing the following information in the results: " & vbnewline & vbnewline needtick = true 'STUFF TO SHOW '============= 'buswidth if Request("buswidth-s")<>"" then if needtick = true then sqlquery = sqlquery & ", " sqlquery = sqlquery & "[tblChips].[cpBusWidth]" engquery = engquery & " - Bus width" & vbnewline needtick = true end if 'chipfamily if Request("chipfamily-s")<>"" then if needtick = true then sqlquery = sqlquery & ", " sqlquery = sqlquery & "[tblFamilies].[FaName]" engquery = engquery & " - Chip family name" & vbnewline needtick = true end if 'rom if Request("rom-s")<>"" then if needtick = true then sqlquery = sqlquery & ", " sqlquery = sqlquery & "[tblChips].[cpROM/On-Chip], [tblChips].[cpROMunits]" engquery = engquery & " - Onboard ROM" & vbnewline needtick = true end if 'romtype if Request("romtype-s")<>"" then if needtick = true then sqlquery = sqlquery & ", " sqlquery = sqlquery & "[tblChips].[cpROM/Type]" engquery = engquery & " - ROM type" & vbnewline needtick = true end if 'ram if Request("ram-s")<>"" then if needtick = true then sqlquery = sqlquery & ", " sqlquery = sqlquery & "[tblChips].[cpRAM/On-Chip], [tblChips].[cpRAMunits]" engquery = engquery & " - Onboard RAM" & vbnewline needtick = true end if 'extmem if Request("extmem-s")<>"" then if needtick = true then sqlquery = sqlquery & ", " sqlquery = sqlquery & "[tblChips].[cpExtMem], [tblChips].[cpExtunits]" engquery = engquery & " - External memory" & vbnewline needtick = true end if 'timers if Request("times-s")<>"" then if needtick = true then sqlquery = sqlquery & ", " sqlquery = sqlquery & "[tblChips].[cpTimers/Counters]" engquery = engquery & " - Timers/counters" & vbnewline needtick = true end if 'watchdog if Request("watchdog-s")<>"" then if needtick = true then sqlquery = sqlquery & ", " sqlquery = sqlquery & "[tblChips].[cpWatchdog]" engquery = engquery & " - Watchdogs" & vbnewline needtick = true end if 'extirq if Request("extirq-s")<>"" then if needtick = true then sqlquery = sqlquery & ", " sqlquery = sqlquery & "[tblChips].[cpInterrupts(Ext)]" engquery = engquery & " - External IRQs" & vbnewline needtick = true end if 'io if Request("io-s")<>"" then if needtick = true then sqlquery = sqlquery & ", " sqlquery = sqlquery & "[tblChips].[cpI/O-lines]" engquery = engquery & " - I/O bits" & vbnewline needtick = true end if 'uart if Request("uart-s")<>"" then if needtick = true then sqlquery = sqlquery & ", " sqlquery = sqlquery & "[tblChips].[cpSerial]" engquery = engquery & " - UARTs" & vbnewline needtick = true end if 'adc if Request("adc-s")<>"" then if needtick = true then sqlquery = sqlquery & ", " sqlquery = sqlquery & "[tblChips].[cpADC_I/Ps]" engquery = engquery & " - ADCs" & vbnewline needtick = true end if 'adcres if Request("adcres-s")<>"" then if needtick = true then sqlquery = sqlquery & ", " sqlquery = sqlquery & "[tblChips].[cpADCRes]" engquery = engquery & " - ADC resolution" & vbnewline needtick = true end if 'pwm if Request("pwm-s")<>"" then if needtick = true then sqlquery = sqlquery & ", " sqlquery = sqlquery & "[tblChips].[cpPWM#]" engquery = engquery & " - PWMs" & vbnewline needtick = true end if 'maxcurrent if Request("maxcurrent-s")<>"" then if needtick = true then sqlquery = sqlquery & ", " sqlquery = sqlquery & "[tblChips].[cpCurrent(Running)]" engquery = engquery & " - Max. current" & vbnewline needtick = true end if 'currentfreq if Request("currentfreq-s")<>"" then if needtick = true then sqlquery = sqlquery & ", " sqlquery = sqlquery & "[tblChips].[cpSpeed]" engquery = engquery & " - Frequency at which max. current is measured" & vbnewline needtick = true end if 'minclock if Request("minclock-s")<>"" then if needtick = true then sqlquery = sqlquery & ", " sqlquery = sqlquery & "[tblChips].[cpMinSpeed]" engquery = engquery & " - Min. clock speed" & vbnewline needtick = true end if 'maxclock if Request("maxclock-s")<>"" then if needtick = true then sqlquery = sqlquery & ", " sqlquery = sqlquery & "[tblChips].[cpMaxClkSpeed]" engquery = engquery & " - Max. clock speed" & vbnewline needtick = true end if 'equivmax if Request("equivmax-s")<>"" then if needtick = true then sqlquery = sqlquery & ", " sqlquery = sqlquery & "[tblChips].[cpMaxSpeed]" engquery = engquery & " - Equiv. Max. speed" & vbnewline needtick = true end if 'lowpower if Request("lowpower-s")<>"" then if needtick = true then sqlquery = sqlquery & ", " sqlquery = sqlquery & "[tblChips].[cpLowPower]" engquery = engquery & " - Low power features" & vbnewline needtick = true end if 'clocktype if Request("clocktype-s")<>"" then if needtick = true then sqlquery = sqlquery & ", " sqlquery = sqlquery & "[tblChips].[cpClock]" engquery = engquery & " - Clock type" & vbnewline needtick = true end if 'process if Request("process-s")<>"" then if needtick = true then sqlquery = sqlquery & ", " sqlquery = sqlquery & "[tblChips].[cpProcess]" engquery = engquery & " - Manufacturing process" & vbnewline needtick = true end if 'additional if Request("additional-s")<>"" then if needtick = true then sqlquery = sqlquery & ", " sqlquery = sqlquery & "[tblChips].[cpOther]" engquery = engquery & " - Additional features" & vbnewline needtick = true end if 'packaging if Request("packaging-s")<>"" then if needtick = true then sqlquery = sqlquery & ", " sqlquery = sqlquery & "[tblChips].[cpPackages]" engquery = engquery & " - Packaging" & vbnewline needtick = true end if 'manufacturer if Request("manufacturer-s")<>"" then if needtick = true then sqlquery = sqlquery & ", " sqlquery = sqlquery & "[tblManufacturers].[mfName]" engquery = engquery & " - Manufacturer" & vbnewline needtick = true end if 'pdf if Request("pdf-s")<>"" then if needtick = true then sqlquery = sqlquery & ", " sqlquery = sqlquery & "[tblWeb].[waAddress]" engquery = engquery & " - Address of datasheet" & vbnewline needtick = true end if sqlquery = sqlquery & " FROM " & _ "((((tblChips INNER JOIN tblFamilies ON tblChips.cpSubFamily = tblFamilies.faID) INNER JOIN [tblLink-Chip-Manuf] ON tblChips.cpID = [tblLink-Chip-Manuf].lm_cpID) INNER JOIN tblManufacturers ON [tblLink-Chip-Manuf].lm_mfID = tblManufacturers.mfID) INNER JOIN [tblLink-Web-Address] ON tblChips.cpID = [tblLink-Web-Address].wb_cpID) INNER JOIN tblWeb ON [tblLink-Web-Address].wb_waID = tblWeb.waID" & _ " WHERE (([tblChips].[cpChecked] = 1) OR ([tblChips].[cpChecked] = 0)) AND " 'NOW GENERATE QUERY CONDITIONS '============================= needtick = false 'buswidth --------------------------------------------------------- engquerypre = engquerypre & " - Bus widths accepted:" innertick = false innercondition = "" if Request("buswidth-q-8")<>"" then innercondition = innercondition & "([tblChips].[cpBusWidth] = 8)" engquerypre = engquerypre & " 8" innertick = true end if if Request("buswidth-q-16")<>"" then if innertick = true then innercondition = innercondition & " OR " innercondition = innercondition & "([tblChips].[cpBusWidth] = 16)" engquerypre = engquerypre & " 16" innertick = true end if if Request("buswidth-q-32")<>"" then if innertick = true then innercondition = innercondition & " OR " innercondition = innercondition & "([tblChips].[cpBusWidth] = 32)" engquerypre = engquerypre & " 32" innertick = true end if if Request("buswidth-q-DSP")<>"" then if innertick = true then innercondition = innercondition & " OR " innercondition = innercondition & "([tblChips].[cpBusWidth] = 0)" engquerypre = engquerypre & " DSP" innertick = true end if if innercondition <> "" then if needtick = true then sqlquery = sqlquery & " AND " sqlquery = sqlquery & "( " & innercondition & " )" needtick = true else engquerypre = engquerypre & " ALL (none specified)" end if '------------------------------------------------------------------ 'chipfamily --------------------------------------------------------- engquerypre = engquerypre & vbnewline & " - Chip architectures accepted:" innertick = false innercondition = "" if Request("chipfamily-q-8051")<>"" then innercondition = innercondition & "([tblFamilies].[FaName] = '8051')" engquerypre = engquerypre & " 8051" innertick = true end if if Request("chipfamily-q-ARM")<>"" then if innertick = true then innercondition = innercondition & " OR " innercondition = innercondition & "([tblFamilies].[FaName] = 'ARM')" engquerypre = engquerypre & " ARM" innertick = true end if if Request("chipfamily-q-PIC")<>"" then if innertick = true then innercondition = innercondition & " OR " innercondition = innercondition & "([tblFamilies].[FaName] = 'PIC')" engquerypre = engquerypre & " PIC" innertick = true end if if innercondition <> "" then if needtick = true then sqlquery = sqlquery & " AND " sqlquery = sqlquery & "( " & innercondition & " )" needtick = true else engquerypre = engquerypre & " ALL (none specified)" end if '------------------------------------------------------------------ 'rom --------------------------------------------------------- engquerypre = engquerypre & vbnewline & " - Amount of ROM:" innertick = false innercondition = "" if Request("rom-q-eq")<>"" then if innertick = true then innercondition = innercondition & " AND " if Request("rom-q-eq-units") = "K" then innercondition = innercondition & "( (([tblChips].[cpROM/On-Chip] =" & _ csng(Request("rom-q-eq")) & ") AND ([tblChips].[cpROMunits] = 'K')) OR " & _ "(([tblChips].[cpROM/On-Chip] =" & csng(Request("rom-q-eq"))*1024 & _ ") AND ([tblChips].[cpROMunits] <> 'K')) )" else innercondition = innercondition & "( (([tblChips].[cpROM/On-Chip] =" & _ csng(Request("rom-q-eq"))/1024 & ") AND ([tblChips].[cpROMunits] = 'K')) OR " & _ "(([tblChips].[cpROM/On-Chip] =" & csng(Request("rom-q-eq")) & _ ") AND ([tblChips].[cpROMunits] <> 'K')) )" end if engquerypre = engquerypre & " = " & csng(Request("rom-q-eq")) & Request("rom-q-eq-units") innertick = true else if Request("rom-q-ge")<>"" then if Request("rom-q-ge-units") = "K" then innercondition = innercondition & "( (([tblChips].[cpROM/On-Chip] >=" & _ csng(Request("rom-q-ge")) & ") AND ([tblChips].[cpROMunits] = 'K')) OR " & _ "(([tblChips].[cpROM/On-Chip] >=" & csng(Request("rom-q-ge"))*1024 & _ ") AND ([tblChips].[cpROMunits] <> 'K')) )" else innercondition = innercondition & "( (([tblChips].[cpROM/On-Chip] >=" & _ csng(Request("rom-q-ge"))/1024 & ") AND ([tblChips].[cpROMunits] = 'K')) OR " & _ "(([tblChips].[cpROM/On-Chip] >=" & csng(Request("rom-q-ge")) & _ ") AND ([tblChips].[cpROMunits] <> 'K')) )" end if engquerypre = engquerypre & " >= " & csng(Request("rom-q-ge")) & Request("rom-q-ge-units") innertick = true end if if Request("rom-q-lt")<>"" then if innertick = true then innercondition = innercondition & " AND " if Request("rom-q-lt-units") = "K" then innercondition = innercondition & "( (([tblChips].[cpROM/On-Chip] <" & _ csng(Request("rom-q-lt")) & ") AND ([tblChips].[cpROMunits] = 'K')) OR " & _ "(([tblChips].[cpROM/On-Chip] <" & csng(Request("rom-q-lt"))*1024 & _ ") AND ([tblChips].[cpROMunits] <> 'K')) )" else innercondition = innercondition & "( (([tblChips].[cpROM/On-Chip] <" & _ csng(Request("rom-q-lt"))/1024 & ") AND ([tblChips].[cpROMunits] = 'K')) OR " & _ "(([tblChips].[cpROM/On-Chip] <" & csng(Request("rom-q-lt")) & _ ") AND ([tblChips].[cpROMunits] <> 'K')) )" end if if innertick = true then qngquerypre = engquerypre & ", " engquerypre = engquerypre & " < " & csng(Request("rom-q-lt")) & Request("rom-q-lt-units") innertick = true end if end if if innercondition <> "" then if needtick = true then sqlquery = sqlquery & " AND " sqlquery = sqlquery & "( " & innercondition & " )" needtick = true else engquerypre = engquerypre & " ANY (no specification)" end if '------------------------------------------------------------------ 'romtype --------------------------------------------------------- innertick = false innercondition = "" if Request("romtype-q-req")<>"" then 'Specific ROM type required engquerypre = engquerypre & vbnewline & " - ROM type required: " & _ Request("romtype-q-req") & "(Acceptable types ignored)" innercondition = innercondition & "( [tblChips].[cpROM/Type] = '" & _ Request("romtype-q-req") & "' )" else 'Just acceptables specified engquerypre = engquerypre & vbnewline & " - ROM types acceptable: " if Request("romtype-q-acc-romless")<>"" then innercondition = innercondition & "([tblChips].[cpROM/Type] = 'ROMless')" engquerypre = engquerypre & " ROMless" innertick = true end if if Request("romtype-q-acc-rom")<>"" then if innertick = true then innercondition = innercondition & " OR " innercondition = innercondition & "([tblChips].[cpROM/Type] = 'ROM')" engquerypre = engquerypre & " ROM" innertick = true end if if Request("romtype-q-acc-otp")<>"" then if innertick = true then innercondition = innercondition & " OR " innercondition = innercondition & "([tblChips].[cpROM/Type] = 'OTP')" engquerypre = engquerypre & " OTP" innertick = true end if if Request("romtype-q-acc-eprom")<>"" then if innertick = true then innercondition = innercondition & " OR " innercondition = innercondition & "([tblChips].[cpROM/Type] = 'EPROM')" engquerypre = engquerypre & " EPROM" innertick = true end if if Request("romtype-q-acc-epromisp")<>"" then if innertick = true then innercondition = innercondition & " OR " innercondition = innercondition & "([tblChips].[cpROM/Type] = 'EPROM(ISP)')" engquerypre = engquerypre & " EPROM(ISP)" innertick = true end if if Request("romtype-q-acc-flash")<>"" then if innertick = true then innercondition = innercondition & " OR " innercondition = innercondition & "([tblChips].[cpROM/Type] = 'Flash')" engquerypre = engquerypre & " Flash" innertick = true end if if Request("romtype-q-acc-flashotp")<>"" then if innertick = true then innercondition = innercondition & " OR " innercondition = innercondition & "([tblChips].[cpROM/Type] = 'Flash(OTP)')" engquerypre = engquerypre & " Flash(OTP)" innertick = true end if if Request("romtype-q-acc-flashfact")<>"" then if innertick = true then innercondition = innercondition & " OR " innercondition = innercondition & "([tblChips].[cpROM/Type] = 'Flash(Fact.)')" engquerypre = engquerypre & " Flash(Fact.)" innertick = true end if if Request("romtype-q-acc-flashisp")<>"" then if innertick = true then innercondition = innercondition & " OR " innercondition = innercondition & "([tblChips].[cpROM/Type] = 'Flash(ISP)')" engquerypre = engquerypre & " Flash(ISP)" innertick = true end if if Request("romtype-q-acc-flashispiap")<>"" then if innertick = true then innercondition = innercondition & " OR " innercondition = innercondition & "([tblChips].[cpROM/Type] = 'Flash(ISP+IAP)')" engquerypre = engquerypre & " Flash(ISP+IAP)" innertick = true end if if Request("romtype-q-acc-piggyback")<>"" then if innertick = true then innercondition = innercondition & " OR " innercondition = innercondition & "([tblChips].[cpROM/Type] = 'Piggy-back')" engquerypre = engquerypre & " Piggy-back" innertick = true end if if Request("romtype-q-acc-nvram")<>"" then if innertick = true then innercondition = innercondition & " OR " innercondition = innercondition & "([tblChips].[cpROM/Type] = 'NVRAM')" engquerypre = engquerypre & " NVRAM" innertick = true end if end if if innercondition <> "" then if needtick = true then sqlquery = sqlquery & " AND " sqlquery = sqlquery & "( " & innercondition & " )" needtick = true else engquerypre = engquerypre & " ALL (none specified)" end if '------------------------------------------------------------------ 'ram --------------------------------------------------------- engquerypre = engquerypre & vbnewline & " - Amount of RAM:" innertick = false innercondition = "" if Request("ram-q-eq")<>"" then if innertick = true then innercondition = innercondition & " AND " if Request("ram-q-eq-units") = "K" then innercondition = innercondition & "( (([tblChips].[cpRAM/On-Chip] =" & _ csng(Request("ram-q-eq")) & ") AND ([tblChips].[cpRAMunits] = 'K')) OR " & _ "(([tblChips].[cpRAM/On-Chip] =" & csng(Request("ram-q-eq"))*1024 & _ ") AND ([tblChips].[cpRAMunits] <> 'K')) )" else innercondition = innercondition & "( (([tblChips].[cpRAM/On-Chip] =" & _ csng(Request("ram-q-eq"))/1024 & ") AND ([tblChips].[cpRAMunits] = 'K')) OR " & _ "(([tblChips].[cpRAM/On-Chip] =" & csng(Request("ram-q-eq")) & _ ") AND ([tblChips].[cpRAMunits] <> 'K')) )" end if engquerypre = engquerypre & " = " & csng(Request("ram-q-eq")) & Request("ram-q-eq-units") innertick = true else if Request("ram-q-ge")<>"" then if Request("ram-q-ge-units") = "K" then innercondition = innercondition & "( (([tblChips].[cpRAM/On-Chip] >=" & _ csng(Request("ram-q-ge")) & ") AND ([tblChips].[cpRAMunits] = 'K')) OR " & _ "(([tblChips].[cpRAM/On-Chip] >=" & csng(Request("ram-q-ge"))*1024 & _ ") AND ([tblChips].[cpRAMunits] <> 'K')) )" else innercondition = innercondition & "( (([tblChips].[cpRAM/On-Chip] >=" & _ csng(Request("ram-q-ge"))/1024 & ") AND ([tblChips].[cpRAMunits] = 'K')) OR " & _ "(([tblChips].[cpRAM/On-Chip] >=" & csng(Request("ram-q-ge")) & _ ") AND ([tblChips].[cpRAMunits] <> 'K')) )" end if engquerypre = engquerypre & " >= " & csng(Request("ram-q-ge")) & Request("ram-q-ge-units") innertick = true end if if Request("ram-q-lt")<>"" then if innertick = true then innercondition = innercondition & " AND " if Request("ram-q-lt-units") = "K" then innercondition = innercondition & "( (([tblChips].[cpRAM/On-Chip] <" & _ csng(Request("ram-q-lt")) & ") AND ([tblChips].[cpRAMunits] = 'K')) OR " & _ "(([tblChips].[cpRAM/On-Chip] <" & csng(Request("ram-q-lt"))*1024 & _ ") AND ([tblChips].[cpRAMunits] <> 'K')) )" else innercondition = innercondition & "( (([tblChips].[cpRAM/On-Chip] <" & _ csng(Request("roa-q-lt"))/1024 & ") AND ([tblChips].[cpRAMunits] = 'K')) OR " & _ "(([tblChips].[cpRAM/On-Chip] <" & csng(Request("ram-q-lt")) & _ ") AND ([tblChips].[cpRAMunits] <> 'K')) )" end if if innertick = true then qngquerypre = engquerypre & ", " engquerypre = engquerypre & " < " & csng(Request("ram-q-lt")) & Request("ram-q-lt-units") innertick = true end if end if if innercondition <> "" then if needtick = true then sqlquery = sqlquery & " AND " sqlquery = sqlquery & "( " & innercondition & " )" needtick = true else engquerypre = engquerypre & " ANY (no specification)" end if '------------------------------------------------------------------ 'extmem --------------------------------------------------------- innertick = false innercondition = "" if Request("extmem-q")<>"" then 'Specific minimum external memory requested engquerypre = engquerypre & vbnewline & " - Minimum external memory: " & _ Request("extmem-q") innercondition = innercondition & "( [tblChips].[cpExtMem] >= " & _ Request("extmem-q") & " )" end if if innercondition <> "" then if needtick = true then sqlquery = sqlquery & " AND " sqlquery = sqlquery & "( " & innercondition & " )" needtick = true else engquerypre = engquerypre & " ALL (none specified)" end if '------------------------------------------------------------------ 'timers --------------------------------------------------------- innertick = false innercondition = "" if Request("timers-q")<>"" then engquerypre = engquerypre & vbnewline & " - Minimum Timers/Counters: " & _ cint(Request("timers-q")) innercondition = innercondition & "([tblChips].[cpTimers/Counters] >=" & _ cint(Request("timers-q")) & ")" end if if innercondition <> "" then if needtick = true then sqlquery = sqlquery & " AND " sqlquery = sqlquery & "( " & innercondition & " )" needtick = true end if '------------------------------------------------------------------ 'watchdog --------------------------------------------------------- innertick = false innercondition = "" if Request("watchdog-q")<>"" then engquerypre = engquerypre & vbnewline & " - Watchdog required" innercondition = innercondition & "([tblChips].[cpWatchdog] = true)" end if if innercondition <> "" then if needtick = true then sqlquery = sqlquery & " AND " sqlquery = sqlquery & "( " & innercondition & " )" needtick = true end if '------------------------------------------------------------------ 'extirq --------------------------------------------------------- engquerypre = engquerypre & vbnewline & " - Number of external IRQs:" innertick = false innercondition = "" if Request("extirq-q-ge")<>"" then innercondition = innercondition & "([tblChips].[cpInterrupts(Ext)] >=" & cint(Request("extirq-q-ge")) & ")" engquerypre = engquerypre & " >=" & cint(Request("extirq-q-ge")) innertick = true end if if Request("extirq-q-lt")<>"" then if innertick = true then innercondition = innercondition & " AND " innercondition = innercondition & "([tblChips].[cpInterrupts(Ext)] <" & cint(Request("extirq-q-lt")) & ")" engquerypre = engquerypre & " <" & cint(Request("extirq-q-lt")) innertick = true end if if Request("extirq-q-eq")<>"" then if innertick = true then innercondition = innercondition & " AND " innercondition = innercondition & "([tblChips].[cpInterrupts(Ext)] =" & cint(Request("extirq-q-eq")) & ")" engquerypre = engquerypre & " =" & cint(Request("extirq-q-eq")) innertick = true end if if innercondition <> "" then if needtick = true then sqlquery = sqlquery & " AND " sqlquery = sqlquery & "( " & innercondition & " )" needtick = true else engquerypre = engquerypre & " ANY (no specification)" end if '------------------------------------------------------------------ 'io --------------------------------------------------------- innertick = false innercondition = "" if Request("io-q")<>"" then engquerypre = engquerypre & vbnewline & " - Minimum I/O bits: " & _ cint(Request("io-q")) innercondition = innercondition & "([tblChips].[cpI/O-lines] >=" & _ cint(Request("io-q")) & ")" end if if innercondition <> "" then if needtick = true then sqlquery = sqlquery & " AND " sqlquery = sqlquery & "( " & innercondition & " )" needtick = true end if '------------------------------------------------------------------ 'uart --------------------------------------------------------- innertick = false innercondition = "" if Request("uart-q")<>"" then engquerypre = engquerypre & vbnewline & " - Minimum UARTs: " & _ cint(Request("uart-q")) innercondition = innercondition & "([tblChips].[cpSerial] >=" & _ cint(Request("uart-q")) & ")" end if if innercondition <> "" then if needtick = true then sqlquery = sqlquery & " AND " sqlquery = sqlquery & "( " & innercondition & " )" needtick = true end if '------------------------------------------------------------------ 'adc --------------------------------------------------------- innertick = false innercondition = "" if Request("adc-q")<>"" then engquerypre = engquerypre & vbnewline & " - Minimum ADCs: " & _ cint(Request("adc-q")) innercondition = innercondition & "([tblChips].[cpADC_I/Ps] >=" & _ cint(Request("adc-q")) & ")" end if if innercondition <> "" then if needtick = true then sqlquery = sqlquery & " AND " sqlquery = sqlquery & "( " & innercondition & " )" needtick = true end if '------------------------------------------------------------------ 'adcres --------------------------------------------------------- innertick = false innercondition = "" if Request("adcres-q")<>"" then engquerypre = engquerypre & vbnewline & " - Minimum Timers/Counters: " & _ cint(Request("adcres-q")) innercondition = innercondition & "([tblChips].[cpADCRes] >=" & _ cint(Request("adcres-q")) & ")" end if if innercondition <> "" then if needtick = true then sqlquery = sqlquery & " AND " sqlquery = sqlquery & "( " & innercondition & " )" needtick = true end if '------------------------------------------------------------------ 'pwm --------------------------------------------------------- innertick = false innercondition = "" if Request("pwm-q")<>"" then engquerypre = engquerypre & vbnewline & " - Minimum PWMs: " & _ cint(Request("pwm-q")) innercondition = innercondition & "([tblChips].[cpPWM#] >=" & _ cint(Request("pwm-q")) & ")" end if if innercondition <> "" then if needtick = true then sqlquery = sqlquery & " AND " sqlquery = sqlquery & "( " & innercondition & " )" needtick = true end if '------------------------------------------------------------------ 'maxcurrent --------------------------------------------------------- innertick = false innercondition = "" if Request("maxcurrent-q")<>"" then engquerypre = engquerypre & vbnewline & " - Minimum Max. Current: " & _ cint(Request("maxcurrent-q")) innercondition = innercondition & "([tblChips].[cpCurrent(Running)] >=" & _ cint(Request("maxcurrent-q")) & ")" end if if innercondition <> "" then if needtick = true then sqlquery = sqlquery & " AND " sqlquery = sqlquery & "( " & innercondition & " )" needtick = true end if '------------------------------------------------------------------ 'minclock --------------------------------------------------------- innertick = false innercondition = "" if Request("minclock-q")<>"" then engquerypre = engquerypre & vbnewline & " - Maximum min. clock speed: " & _ cint(Request("minclock-q")) innercondition = innercondition & "([tblChips].[cpMinSpeed] <=" & _ cint(Request("minclock-q")) & ")" end if if innercondition <> "" then if needtick = true then sqlquery = sqlquery & " AND " sqlquery = sqlquery & "( " & innercondition & " )" needtick = true end if '------------------------------------------------------------------ 'maxclock --------------------------------------------------------- innertick = false innercondition = "" if Request("maxclock-q")<>"" then engquerypre = engquerypre & vbnewline & " - Minimum max. Speed: " & _ cint(Request("maxclock-q")) innercondition = innercondition & "([tblChips].[cpMaxClkSpeed] >=" & _ cint(Request("maxclock-q")) & ")" end if if innercondition <> "" then if needtick = true then sqlquery = sqlquery & " AND " sqlquery = sqlquery & "( " & innercondition & " )" needtick = true end if '------------------------------------------------------------------ 'equivmax --------------------------------------------------------- innertick = false innercondition = "" if Request("equivmax-q")<>"" then engquerypre = engquerypre & vbnewline & " - Equiv. max. Speed: " & _ cint(Request("equivmax-q")) innercondition = innercondition & "([tblChips].[cpMaxSpeed] >=" & _ cint(Request("equivmax-q")) & ")" end if if innercondition <> "" then if needtick = true then sqlquery = sqlquery & " AND " sqlquery = sqlquery & "( " & innercondition & " )" needtick = true end if '------------------------------------------------------------------ 'lowpower --------------------------------------------------------- innertick = false innercondition = "" if Request("lowpower-q")<>"" then engquerypre = engquerypre & vbnewline & " - Low power features required" innercondition = innercondition & "([tblChips].[cpLowPower] = true)" end if if innercondition <> "" then if needtick = true then sqlquery = sqlquery & " AND " sqlquery = sqlquery & "( " & innercondition & " )" needtick = true end if '------------------------------------------------------------------ 'clock type --------------------------------------------------------- innertick = false innercondition = "" if Request("clocktype-q-req")<>"" then 'Specific clock type required engquerypre = engquerypre & vbnewline & " - Clock type required: " & _ Request("clocktype-q-req") & " (Acceptable types ignored)" innercondition = innercondition & "( [tblChips].[cpClock] Like '%" & _ Request("clocktype-q-req") & "%' )" else 'Just acceptables specified engquerypre = engquerypre & vbnewline & " - Clock types acceptable: " if Request("clocktype-q-acc-crystal")<>"" then innercondition = innercondition & "([tblChips].[cpClock] Like '%Crystal%')" engquerypre = engquerypre & " Crystal" innertick = true end if if Request("clocktype-q-acc-rc")<>"" then if innertick = true then innercondition = innercondition & " OR " innercondition = innercondition & "([tblChips].[cpClock] Like '%RC%')" engquerypre = engquerypre & " RC" innertick = true end if if Request("clocktype-q-acc-ceramic")<>"" then if innertick = true then innercondition = innercondition & " OR " innercondition = innercondition & "([tblChips].[cpClock] Like '%Ceramic%')" engquerypre = engquerypre & " Ceramic" innertick = true end if if Request("clocktype-q-acc-external")<>"" then if innertick = true then innercondition = innercondition & " OR " innercondition = innercondition & "([tblChips].[cpClock] Like '%External%')" engquerypre = engquerypre & " External" innertick = true end if if Request("clocktype-q-acc-lc")<>"" then if innertick = true then innercondition = innercondition & " OR " innercondition = innercondition & "([tblChips].[cpClock] Like '%LC%')" engquerypre = engquerypre & " LC" innertick = true end if if Request("clocktype-q-acc-pll")<>"" then if innertick = true then innercondition = innercondition & " OR " innercondition = innercondition & "([tblChips].[cpClock] Like '%PLL%')" engquerypre = engquerypre & " PLL" innertick = true end if end if if innercondition <> "" then if needtick = true then sqlquery = sqlquery & " AND " sqlquery = sqlquery & "( " & innercondition & " )" needtick = true else engquerypre = engquerypre & " ALL (none specified)" end if '------------------------------------------------------------------ 'packaging --------------------------------------------------------- innertick = false innercondition = "" if Request("packaging-q-req")<>"" then 'Specific clock type required engquerypre = engquerypre & vbnewline & " - Packaging required: " & _ Request("packaging-q-req") & " (Acceptable types ignored)" innercondition = innercondition & "( [tblChips].[cpPackages] Like '%" & _ Request("packaging-q-req") & "%' )" else 'Just acceptables specified engquerypre = engquerypre & vbnewline & " - Packaging types acceptable: " if Request("packaging-q-acc-dip")<>"" then innercondition = innercondition & "([tblChips].[cpPackages] Like '%DIP%')" engquerypre = engquerypre & " DIP" innertick = true end if if Request("packaging-q-acc-sdip")<>"" then if innertick = true then innercondition = innercondition & " OR " innercondition = innercondition & "([tblChips].[cpPackages] Like '%SDIP%')" engquerypre = engquerypre & " SDIP" innertick = true end if if Request("packaging-q-acc-lcc")<>"" then if innertick = true then innercondition = innercondition & " OR " innercondition = innercondition & "([tblChips].[cpPackages] Like '%LCC%')" engquerypre = engquerypre & " LCC" innertick = true end if if Request("packaging-q-acc-qfp")<>"" then if innertick = true then innercondition = innercondition & " OR " innercondition = innercondition & "([tblChips].[cpPackages] Like '%QFP%')" engquerypre = engquerypre & " QFP" innertick = true end if if Request("packaging-q-acc-ssop")<>"" then if innertick = true then innercondition = innercondition & " OR " innercondition = innercondition & "([tblChips].[cpPackages] Like '%SSOP%')" engquerypre = engquerypre & " SSOP" innertick = true end if if Request("packaging-q-acc-vso")<>"" then if innertick = true then innercondition = innercondition & " OR " innercondition = innercondition & "([tblChips].[cpPackages] Like '%VSO%')" engquerypre = engquerypre & " VSO" innertick = true end if if Request("packaging-q-acc-mlp")<>"" then if innertick = true then innercondition = innercondition & " OR " innercondition = innercondition & "([tblChips].[cpPackages] Like '%MLP%')" engquerypre = engquerypre & " MLP" innertick = true end if if Request("packaging-q-acc-soic")<>"" then if innertick = true then innercondition = innercondition & " OR " innercondition = innercondition & "([tblChips].[cpPackages] Like '%SOIC%')" engquerypre = engquerypre & " SOIC" innertick = true end if if Request("packaging-q-acc-pso")<>"" then if innertick = true then innercondition = innercondition & " OR " innercondition = innercondition & "([tblChips].[cpPackages] Like '%PSO%')" engquerypre = engquerypre & " PSO" innertick = true end if if Request("packaging-q-acc-bga")<>"" then if innertick = true then innercondition = innercondition & " OR " innercondition = innercondition & "([tblChips].[cpPackages] Like '%BGA%')" engquerypre = engquerypre & " BGA" innertick = true end if if Request("packaging-q-acc-sos")<>"" then if innertick = true then innercondition = innercondition & " OR " innercondition = innercondition & "([tblChips].[cpPackages] Like '%-SO%')" engquerypre = engquerypre & " SO" innertick = true end if if Request("packaging-q-acc-ecp")<>"" then if innertick = true then innercondition = innercondition & " OR " innercondition = innercondition & "([tblChips].[cpPackages] Like '%ECP%')" engquerypre = engquerypre & " ECP" innertick = true end if if Request("packaging-q-acc-simm")<>"" then if innertick = true then innercondition = innercondition & " OR " innercondition = innercondition & "([tblChips].[cpPackages] Like '%SIMM%')" engquerypre = engquerypre & " SIMM" innertick = true end if if Request("packaging-q-acc-qfn")<>"" then if innertick = true then innercondition = innercondition & " OR " innercondition = innercondition & "([tblChips].[cpPackages] Like '%QFN%')" engquerypre = engquerypre & " QFN" innertick = true end if end if if innercondition <> "" then if needtick = true then sqlquery = sqlquery & " AND " sqlquery = sqlquery & "( " & innercondition & " )" needtick = true else engquerypre = engquerypre & " ALL (none specified)" end if '------------------------------------------------------------------ 'additional --------------------------------------------------------- innertick = false innercondition = "" engquerypre = engquerypre & vbnewline & " - Additional features required: " if Request("additional-q-req-pcm")<>"" then innercondition = innercondition & "([tblChips].[cpOther] Like '%PCM%')" engquerypre = engquerypre & " PCM" innertick = true end if if Request("additional-q-req-gt-ip")<>"" then if innertick = true then innercondition = innercondition & " AND " innercondition = innercondition & "([tblChips].[cpOther] Like '%Interrupt Priorities%')" engquerypre = engquerypre & " -- >1 Interrupt Priorities" & vbnewline innertick = true end if 'if Request("additional-q-req-3ip")<>"" then ' if innertick = true then innercondition = innercondition & " AND " ' innercondition = innercondition & "([tblChips].[cpOther] Like '%3 Interrupt Priorities%')" ' engquerypre = engquerypre & " -- 3 Interrupt Priorities" & vbnewline ' innertick = true 'end if if Request("additional-q-req-capcom")<>"" then if innertick = true then innercondition = innercondition & " AND " innercondition = innercondition & "([tblChips].[cpOther] Like '%CAPCOM%')" engquerypre = engquerypre & " -- CAPCOM" & vbnewline innertick = true end if if Request("additional-q-req-datapointers")<>"" then if innertick = true then innercondition = innercondition & " AND " innercondition = innercondition & "([tblChips].[cpOther] Like '%Data Pointers%')" engquerypre = engquerypre & " -- Data Pointers" & vbnewline innertick = true end if if Request("additional-q-req-i2c")<>"" then if innertick = true then innercondition = innercondition & " AND " innercondition = innercondition & "([tblChips].[cpOther] Like '%I2C%')" engquerypre = engquerypre & " -- I2C" & vbnewline innertick = true end if if Request("additional-q-req-mdu")<>"" then if innertick = true then innercondition = innercondition & " AND " innercondition = innercondition & "([tblChips].[cpOther] Like '%MDU%')" engquerypre = engquerypre & " -- MDU" & vbnewline innertick = true end if if Request("additional-q-req-led")<>"" then if innertick = true then innercondition = innercondition & " AND " innercondition = innercondition & "([tblChips].[cpOther] Like '%LED%')" engquerypre = engquerypre & " -- LED" & vbnewline innertick = true end if if Request("additional-q-req-can")<>"" then if innertick = true then innercondition = innercondition & " AND " innercondition = innercondition & "([tblChips].[cpOther] Like '%CAN%')" engquerypre = engquerypre & " -- CAN" & vbnewline innertick = true end if if Request("additional-q-req-lcd")<>"" then if innertick = true then innercondition = innercondition & " AND " innercondition = innercondition & "([tblChips].[cpOther] Like '%LCD%')" engquerypre = engquerypre & " -- LCD" & vbnewline innertick = true end if if Request("additional-q-req-spi")<>"" then if innertick = true then innercondition = innercondition & " AND " innercondition = innercondition & "([tblChips].[cpOther] Like '%SPI%')" engquerypre = engquerypre & " -- SPI" & vbnewline innertick = true end if if Request("additional-q-req-hsio")<>"" then if innertick = true then innercondition = innercondition & " AND " innercondition = innercondition & "([tblChips].[cpOther] Like '%HSIO%')" engquerypre = engquerypre & " -- HSIO" & vbnewline innertick = true end if if Request("additional-q-req-byteseeprom")<>"" then if innertick = true then innercondition = innercondition & " AND " innercondition = innercondition & "([tblChips].[cpOther] Like '%EEPROM%')" engquerypre = engquerypre & " -- bytes EEPROM" & vbnewline innertick = true end if if Request("additional-q-req-bop")<>"" then if innertick = true then innercondition = innercondition & " AND " innercondition = innercondition & "([tblChips].[cpOther] Like '%BOP%')" engquerypre = engquerypre & " -- BOP" & vbnewline innertick = true end if if Request("additional-q-req-lv")<>"" then if innertick = true then innercondition = innercondition & " AND " innercondition = innercondition & "([tblChips].[cpOther] Like '%LV%')" engquerypre = engquerypre & " -- LV" & vbnewline innertick = true end if if Request("additional-q-req-rtc")<>"" then if innertick = true then innercondition = innercondition & " AND " innercondition = innercondition & "([tblChips].[cpOther] Like '%RTC%')" engquerypre = engquerypre & " -- RTC" & vbnewline innertick = true end if if Request("additional-q-req-pca")<>"" then if innertick = true then innercondition = innercondition & " AND " innercondition = innercondition & "([tblChips].[cpOther] Like '%PCA%')" engquerypre = engquerypre & " -- PCA" & vbnewline innertick = true end if if Request("additional-q-req-kbd")<>"" then if innertick = true then innercondition = innercondition & " AND " innercondition = innercondition & "([tblChips].[cpOther] Like '%KBD%')" engquerypre = engquerypre & " -- KBD" & vbnewline innertick = true end if if Request("additional-q-req-adcomp")<>"" then if innertick = true then innercondition = innercondition & " AND " innercondition = innercondition & "([tblChips].[cpOther] Like '%ADComp%')" engquerypre = engquerypre & " -- ADComp" & vbnewline innertick = true end if if Request("additional-q-req-lowemi")<>"" then if innertick = true then innercondition = innercondition & " AND " innercondition = innercondition & "([tblChips].[cpOther] Like '%LowEMI%')" engquerypre = engquerypre & " -- LowEMI" & vbnewline innertick = true end if if Request("additional-q-req-lowrfi")<>"" then if innertick = true then innercondition = innercondition & " AND " innercondition = innercondition & "([tblChips].[cpOther] Like '%LowRFI%')" engquerypre = engquerypre & " -- LowRFI" & vbnewline innertick = true end if if Request("additional-q-req-usb")<>"" then if innertick = true then innercondition = innercondition & " AND " innercondition = innercondition & "([tblChips].[cpOther] Like '%USB%')" engquerypre = engquerypre & " -- USB" & vbnewline innertick = true end if if Request("additional-q-req-tv")<>"" then if innertick = true then innercondition = innercondition & " AND " innercondition = innercondition & "([tblChips].[cpOther] Like '%TV%')" engquerypre = engquerypre & " -- TV" & vbnewline innertick = true end if if Request("additional-q-req-ddc")<>"" then if innertick = true then innercondition = innercondition & " AND " innercondition = innercondition & "([tblChips].[cpOther] Like '%DDC%')" engquerypre = engquerypre & " -- DDC" & vbnewline innertick = true end if if Request("additional-q-req-monitorsync")<>"" then if innertick = true then innercondition = innercondition & " AND " innercondition = innercondition & "([tblChips].[cpOther] Like '%Monitor Sync')" engquerypre = engquerypre & " -- Monitor Sync" & vbnewline innertick = true end if if Request("additional-q-req-telephone")<>"" then if innertick = true then innercondition = innercondition & " AND " innercondition = innercondition & "([tblChips].[cpOther] Like '%Telephone%')" engquerypre = engquerypre & " -- Telephone" & vbnewline innertick = true end if if Request("additional-q-req-debug")<>"" then if innertick = true then innercondition = innercondition & " AND " innercondition = innercondition & "([tblChips].[cpOther] Like '%debug%')" engquerypre = engquerypre & " -- debug" & vbnewline innertick = true end if if Request("additional-q-req-ide")<>"" then if innertick = true then innercondition = innercondition & " AND " innercondition = innercondition & "([tblChips].[cpOther] Like '%IDE%')" engquerypre = engquerypre & " -- IDE" & vbnewline innertick = true end if if Request("additional-q-req-Security")<>"" then if innertick = true then innercondition = innercondition & " AND " innercondition = innercondition & "([tblChips].[cpOther] Like '%Security%')" engquerypre = engquerypre & " -- Security" & vbnewline innertick = true end if if Request("additional-q-req-MP3")<>"" then if innertick = true then innercondition = innercondition & " AND " innercondition = innercondition & "([tblChips].[cpOther] Like '%MP3%')" engquerypre = engquerypre & " -- MP3" & vbnewline innertick = true end if if Request("additional-q-req-dac")<>"" then if innertick = true then innercondition = innercondition & " AND " innercondition = innercondition & "([tblChips].[cpOther] Like '%DAC%')" engquerypre = engquerypre & " -- DAC" & vbnewline innertick = true end if if Request("additional-q-req-Vref")<>"" then if innertick = true then innercondition = innercondition & " AND " innercondition = innercondition & "([tblChips].[cpOther] Like '%Vref%')" engquerypre = engquerypre & " -- Vref" & vbnewline innertick = true end if if Request("additional-q-req-crossbar")<>"" then if innertick = true then innercondition = innercondition & " AND " innercondition = innercondition & "([tblChips].[cpOther] Like '%crossbar%')" engquerypre = engquerypre & " -- crossbar" & vbnewline innertick = true end if if Request("additional-q-req-pmm")<>"" then if innertick = true then innercondition = innercondition & " AND " innercondition = innercondition & "([tblChips].[cpOther] Like '%PMM%')" engquerypre = engquerypre & " -- PMM" & vbnewline innertick = true end if if Request("additional-q-req-psm")<>"" then if innertick = true then innercondition = innercondition & " AND " innercondition = innercondition & "([tblChips].[cpOther] Like '%PSM%')" engquerypre = engquerypre & " -- PSM" & vbnewline innertick = true end if if Request("additional-q-req-tmp")<>"" then if innertick = true then innercondition = innercondition & " AND " innercondition = innercondition & "([tblChips].[cpOther] Like '%TMP%')" engquerypre = engquerypre & " -- TMP" & vbnewline innertick = true end if if Request("additional-q-req-hdlc")<>"" then if innertick = true then innercondition = innercondition & " AND " innercondition = innercondition & "([tblChips].[cpOther] Like '%HDLC%')" engquerypre = engquerypre & " -- HDLC" & vbnewline innertick = true end if if Request("additional-q-req-modem")<>"" then if innertick = true then innercondition = innercondition & " AND " innercondition = innercondition & "([tblChips].[cpOther] Like '%MODEM%')" engquerypre = engquerypre & " -- MODEM" & vbnewline innertick = true end if if Request("additional-q-req-boot")<>"" then if innertick = true then innercondition = innercondition & " AND " innercondition = innercondition & "([tblChips].[cpOther] Like '%BOOT%')" engquerypre = engquerypre & " -- BOOT" & vbnewline innertick = true end if if Request("additional-q-req-baud")<>"" then if innertick = true then innercondition = innercondition & " AND " innercondition = innercondition & "([tblChips].[cpOther] Like '%Baud%')" engquerypre = engquerypre & " -- Baud" & vbnewline innertick = true end if if Request("additional-q-req-logiccells")<>"" then if innertick = true then innercondition = innercondition & " AND " innercondition = innercondition & "([tblChips].[cpOther] Like '%Logic Cells%')" engquerypre = engquerypre & " -- Logic Cells" & vbnewline innertick = true end if if Request("additional-q-req-dma")<>"" then if innertick = true then innercondition = innercondition & " AND " innercondition = innercondition & "([tblChips].[cpOther] Like '%DMA%')" engquerypre = engquerypre & "-- DMA" & vbnewline innertick = true end if if Request("additional-q-req-addressndata")<>"" then if innertick = true then innercondition = innercondition & " AND " innercondition = innercondition & "([tblChips].[cpOther] Like '%Address&Data%')" engquerypre = engquerypre & " -- Address&Data" & vbnewline innertick = true end if if Request("additional-q-req-backup")<>"" then if innertick = true then innercondition = innercondition & " AND " innercondition = innercondition & "([tblChips].[cpOther] Like '%BACKUP%')" engquerypre = engquerypre & " -- BACKUP" & vbnewline innertick = true end if if Request("additional-q-req-CRYPTO")<>"" then if innertick = true then innercondition = innercondition & " AND " innercondition = innercondition & "([tblChips].[cpOther] Like '%CRYPTO%')" engquerypre = engquerypre & " -- CRYPTO" & vbnewline innertick = true end if if Request("additional-q-req-DSP")<>"" then if innertick = true then innercondition = innercondition & " AND " innercondition = innercondition & "([tblChips].[cpOther] Like '%DSP%')" engquerypre = engquerypre & " -- DSP" & vbnewline innertick = true end if if Request("additional-q-req-ISA")<>"" then if innertick = true then innercondition = innercondition & " AND " innercondition = innercondition & "([tblChips].[cpOther] Like '%ISA%')" engquerypre = engquerypre & " -- ISA" & vbnewline innertick = true end if if Request("additional-q-req-Sqroot")<>"" then if innertick = true then innercondition = innercondition & " AND " innercondition = innercondition & "([tblChips].[cpOther] Like '%Sqroot%')" engquerypre = engquerypre & " -- Sqroot" & vbnewline innertick = true end if if Request("additional-q-req-DP-RAM")<>"" then if innertick = true then innercondition = innercondition & " AND " innercondition = innercondition & "([tblChips].[cpOther] Like '%DP-RAM%')" engquerypre = engquerypre & " -- DP-RAM" & vbnewline innertick = true end if if Request("additional-q-req-PC-104")<>"" then if innertick = true then innercondition = innercondition & " AND " innercondition = innercondition & "([tblChips].[cpOther] Like '%PC-104%')" engquerypre = engquerypre & " -- PC-104" & vbnewline innertick = true end if if Request("additional-q-req-PCM Audio")<>"" then if innertick = true then innercondition = innercondition & " AND " innercondition = innercondition & "([tblChips].[cpOther] Like '%PCM Audio%')" engquerypre = engquerypre & " -- PCM Audio" & vbnewline innertick = true end if if Request("additional-q-req-Rad Hard")<>"" then if innertick = true then innercondition = innercondition & " AND " innercondition = innercondition & "([tblChips].[cpOther] Like '%Rad Hard%')" engquerypre = engquerypre & " -- Rad Hard" & vbnewline innertick = true end if if Request("additional-q-req-CEBus")<>"" then if innertick = true then innercondition = innercondition & " AND " innercondition = innercondition & "([tblChips].[cpOther] Like '%CEBus%')" engquerypre = engquerypre & " -- CEBus" & vbnewline innertick = true end if if Request("additional-q-req-TCPstack")<>"" then if innertick = true then innercondition = innercondition & " AND " innercondition = innercondition & "([tblChips].[cpOther] Like '%TCPstack%')" engquerypre = engquerypre & " -- TCPstack" & vbnewline innertick = true end if if Request("additional-q-req-Infrared")<>"" then if innertick = true then innercondition = innercondition & " AND " innercondition = innercondition & "([tblChips].[cpOther] Like '%Infrared%')" engquerypre = engquerypre & " -- Infrared" & vbnewline innertick = true end if function StripStuff(strInput) Dim iPos, sNew, iTemp, skip strInput = Trim(strInput) If strInput <> "" Then iPos = 1 skip = false iTemp = Len(strInput) do If Mid(strInput,iPos,1) <> "," Then sNew = sNew & Mid(strInput,iPos,1) else skip = true End If iPos = iPos + 1 loop until (iPos >= iTemp) or (skip = true) Else sNew = "" End If StripStuff = sNew end function 'family specific stuff for zz=1 to numFamSpecificDropdowns if Request("famspecific-" & zz & "-q")<>"" then if innertick = true then innercondition = innercondition & " AND " innercondition = innercondition & "([tblChips].[cpOther] Like '%" & StripStuff(Request("famspecific-" & zz & "-q")) & "%')" engquerypre = engquerypre & " -- " & StripStuff(Request("famspecific-" & zz & "-q")) & vbnewline innertick = true end if next if innercondition <> "" then if needtick = true then sqlquery = sqlquery & " AND " sqlquery = sqlquery & "( " & innercondition & " )" needtick = true else engquerypre = engquerypre & " None" end if '------------------------------------------------------------------ 'add sort by sqlquery = sqlquery & " ORDER BY cpChipNumber" 'Just check they've entered a valid e-mail address and a description and prompt to go back otherwise dim complaint complaint = 0 'Where error is caught before being emailed, just puts html message saying please go back and correct If Err.number <> 0 then %>An error has occurred. Either some details entered/selected are incorrect or out of range.
Please use your browsers back button to return to the previous page and correct the error.<% else if instr(1,Request("email"),"@")<1 or instr(1,Request("email"),".")<1 or Request("desc")="" or Request("passw")="" then %>

Please enter a valid email address, password and a description for your search. Click your browser's back button to return to the form.

<% else 'print out results dim summary summary = engquerypre & vbnewline & vbnewline & engquery %>

<%=Request("desc")%>

Search for <%=Request("email")%>

<%=summary%>
<% 'open database connection set odbcCon = Server.CreateObject("ADODB.Connection") odbcCon.Open dsnMicrosearch Set queryRS = Server.CreateObject("ADODB.RecordSet") 'DEFINE THE INSERT QUERY sqlquery = replace(sqlquery,"'","''") summary = Request("desc") & vbnewline & "For " & Request("email") & vbnewline & vbnewline & summary dim insertquery insertquery = "INSERT INTO tblWebQuery " & _ "(queryName, querySQL, queryPrecis, queryShow, queryPassword, queryAltFooter) VALUES " & _ "('Custom search','" & sqlquery & "','" & summary & "','0','" & Request("passw") & "','')" 'DO IT queryRS.Open insertquery,odbcCon,2,2 'FIND THE ID OF THE NEW QUERY queryRS.Open "SELECT queryID FROM tblWebQuery WHERE querySQL = '" & sqlquery & "' AND queryPrecis = '" & summary & "'",odbcCon,2,2 queryIDNum=queryRS("queryID") queryID=queryRS("queryID") %>

Click here to view your query. ">https://https://www.computer-solutions.co.uk/query.asp?i=<%=queryRS("queryID")%> This has also been e-mailed to you.

<% 'FIND THE NUMBER OF RESULTS THE QUERY WILL GENERATE Set queryListRS = Server.CreateObject("ADODB.RecordSet") queryListRS.Open "SELECT * FROM tblWebQuery WHERE queryID=" & queryIDNum,odbcCon, 2,2 querySQL = queryListRS("querySQL") Set queryRS = Server.CreateObject("ADODB.RecordSet") queryRS.open querySQL,odbcCon numrecords = RecordCount(queryRS) %>
Number of components found: <%=numrecords%>
<% dim emailstring, emailstring2 emailstring = "We hope our query system was useful in finding the right chip(s) for you." & vbnewline & "Please click the link below at any time in the future to see if your results have changed," & vbnewline & "as they will be updated automatically when changes are made to our database." & vbnewline & vbnewline emailstring = emailstring & "https://https://www.computer-solutions.co.uk/query.asp?i=" & queryRS("queryID") & vbnewline & vbnewline emailstring = emailstring & "Please remember your password: " & Request("passw") & vbnewline & vbnewline emailstring = emailstring & "------------------------------------" & vbnewline emailstring = emailstring & queryPrecis & vbnewline emailstring = emailstring & "------------------------------------" & vbnewline emailstring = emailstring & "E-mail: sales@computer-solutions.co.uk" & vbnewline emailstring = emailstring & "Computer Solutions Ltd.         Phone:  +44  (0)1 932 829 460" & vbnewline emailstring = emailstring & "1a New Haw Road,                Fax:    +44  (0)1 932 840 603" & vbnewline emailstring = emailstring & "Addlestone, Surrey, https://https://www.computer-solutions.co.uk" & vbnewline emailstring = emailstring & "KT15 2BZ  England " & vbnewline & vbnewline emailstring = emailstring & "For the largest range of embedded microprocessor development tools" & vbnewline emailstring2 = "A query was sent by " & Request("name") & vbnewline emailstring2 = emailstring2 & "Email: " & Request("email") & vbnewline emailstring2 = emailstring2 & "Query description: " & Request("desc") & vbnewline emailstring2 = emailstring2 & "Password: " & Request("passw") & vbnewline emailstring2 = emailstring2 & "Search ID: " & queryRS("queryID") & vbnewline emailstring2 = emailstring2 & vbnewline emailstring2 = emailstring2 & summary & vbnewline emailstring2 = emailstring2 & "Search Query has presented the user with : " & numrecords & " results" 'search criteria to go here 'seesion vairables session("sName") = Request("name") session("sEmail") = Request("email") session("sdesc")= Request("desc") 'email it SendEmail "website@computer-solutions.co.uk", Request("email"), "Custom search results: " & Request("desc"), emailstring SendEmail "website@computer-solutions.co.uk", "micro-search@computer-solutions.co.uk", "Custom search results: " & Request("desc"), emailstring2 queryRS.close end if end if end if %> <% ShowPageFooter()%>