%
DBQ="server=127.0.0.1; driver=MySQL; uid=root; password=cmbadmin; db=cmbcomp"
DBQparts="server=127.0.0.1; driver=MySQL; uid=root; password=cmbadmin; db=cmbcomp"
PDFtaker="Provider=SQLOLEDB; Data Source=192.168.1.157; Initial Catalog=GCS; User ID=sa; Password=sagcs; Network Library=dbmssocn"
%>
<%
dim anArray(300)
dim anArray2(300)
dim partArray(3,300)
mydate=year(date) & "-" & right("0" & month(date),2) & "-" & right("0" & day(date),2)
'on error resume next
mypart = trim(Request("part") & "")
mypart = replace(mypart,"%","")
mypart = replace(mypart,"\","")
mypart = replace(mypart,"/","")
mypart = replace(mypart,"-","")
mypart = replace(mypart,"*","")
mypart = replace(mypart,"'","")
mypart = replace(mypart,"""","")
mypart = split(mypart & chr(13) & chr(10),chr(13) & chr(10))
InvalidParts = ""
set cnn=Server.CreateObject("ADODB.Connection")
cnn.Open PDFTaker
mycount = 0 ' Main Array --> SE + added others
searchcounter = 0 ' Doom + CMB stock array
for j=0 to ubound(mypart)-1
lastpartsearched = mypart(j)
if len(lastpartsearched) > 2 then
' dim httpSiliconExpert
' set httpSiliconExpert = Server.CreateObject("AbsoluteHttp.Conn")
'
' httpSiliconExpert.AllowRedirect = false
' status = httpSiliconExpert.SendRequestURL(httpSiliconExpert.HTTP_GET,"http://www.siliconexpert.com/SEWS/Ws?invoke=getPart&partNumber=" & lastpartsearched & "&key=cmbpartaccess")
' status = httpSiliconExpert.SendRequestURL(httpSiliconExpert.HTTP_GET,"http://www.siliconexpert.com/se_pn/PartSearch?invoke=getPart&partNumber=" & lastpartsearched & "&userName=gold&password=goldsemi1")
'
' 'Response.Write "status= " & status
' 'Response.Write httpSiliconExpert.ResponseBody
' 'Response.End
'
'
' if status = 0 then
'
' html = httpSiliconExpert.ResponseBody
'
' 'cmbpart msgarray = split(html,"- ")
msgarray = split(html,"
- ")
' 'Response.Write ubound(msgarray)
' 'Response.End
'
'
' for i=0 to ubound(msgarray) '(1st entry, last entry of XML)
'
'
'
'
' partArray(0,mycount) = replace(FindPattern(msgarray(i),"(
).*?(?=<.part_number>)",""),"","")
' partArray(1,mycount) = replace(FindPattern(msgarray(i),"().*?(?=<.man_name>)",""),"","")
' partArray(2,mycount) = replace(FindPattern(msgarray(i),"().*?(?=<.description>)",""),"","")
' partArray(3,mycount) = replace(FindPattern(msgarray(i),"().*?(?=<.data_sheet>)",""),"","")
'
'
' '''''''''adam
' if len(partArray(0,mycount)) >= 2 and len(partArray(1,mycount)) > 2 and len(partArray(2,mycount)) > 2 and len(partArray(3,mycount)) >= 7 then
'
' mysql="select search from datasheets where search = '" & replace(replace(replace(replace(partArray(0,mycount),"'","`"),"\",""),"-",""),"/","") & "'"
' dim objRS
' dim irecordcount
' irecordcount = 0
' set objRS = server.createobject("ADODB.Recordset")
' objRS.Open mysql, PDFTaker
' do while not objrs.eof
' irecordcount = irecordcount + 1
' objrs.movenext
' loop
'
' if irecordcount = 0 then
' MySQL = "INSERT INTO datasheets (search,part,mfg,description,link) VALUES ('" & replace(replace(replace(replace(partArray(0,mycount),"'","`"),"\",""),"-",""),"/","") & "','" & replace(replace(partArray(0,mycount),"'","`"),",",":") & "','" & replace(replace(partArray(1,mycount),"'","`"),",",":") & "','" & replace(replace(partArray(2,mycount),"'","`"),",",":") & "','" & replace(replace(partArray(3,mycount),"'","`"),",",":") & "')"
' 'Response.Write mySQL
' 'response.end
' set rs=cnn.Execute(mySQL,,adCmdText)
' end if
'
'
' end if '''''''''''''adam
' mycount = mycount + 1
'
' next
'
'
' end if
'cnn.close
'----------- Get Part Numbers INFO --------------------------------------------------------------------
'CMB STOCK FILE ---------------------------------------------------------------------------------------
set cnn=Server.CreateObject("ADODB.Connection")
cnn.Open PDFTaker
'MySQL = "Select distinct part,mfg,description,link from partlink where part like '" & lastpartsearched & "%' order by part,mfg"
MySQL = "Select distinct part,mfg,description,link from datasheets where part like '" & lastpartsearched & "%' order by part,mfg"
'MySQL = "Select search,mfg,link from partlink where search like 'BAV99%' order by search,mfg"
'Response.Write mySQL
'response.end
set rs=cnn.Execute(mySQL,,adCmdText)
do while not rs.eof
anArray(searchcounter)= rs("part") & ""
anArray2(searchcounter)= rs("mfg") & ""
search = rs("part")& ""
mfg = rs("mfg")& ""
partArray(0,searchcounter) = rs("part") & ""
partArray(1,searchcounter) = rs("mfg") &""
partArray(2,searchcounter) = rs("description") &""
partArray(3,searchcounter) = rs("link") &""
'Response.Write " " & searchcounter & ") " & rs("part")
searchcounter = searchcounter + 1
rs.movenext
loop
cnn.close
'DOOM STOCK --------------------------------------------------------------------------------------------
'Response.Write " Doom.com"
''' dim httpDoom
'''
''' set httpDoom = Server.CreateObject("AbsoluteHttp.Conn")
''' httpDoom.AllowRedirect = true
'''
''' status = httpDoom.SendRequestURL(httpDoom.HTTP_GET,"http://beta.doom.com/xml/xml_sic.php?v=0&p=" & lastpartsearched)
'''
''' if status = 0 then
'''
''' html = httpDoom.ResponseBody
''' msgarray = split(lcase(html),"")
'''
''' for i=1 to ubound(msgarray)
'''
''' anArray(searchcounter)= ucase(FindPattern(msgarray(i),"().*?(?= )","part"))
''' anArray2(searchcounter)= ucase(FindPattern(msgarray(i),"().*?(?= )","mfg"))
''' 'Response.Write " " & searchcounter & ") " & ucase(FindPattern(msgarray(i),"().*?(?= )","part"))
'''
''' searchcounter = searchcounter + 1
'''
''' next
''' end if
end if
next 'end of multi search loop
set rs= nothing
set cnn=nothing
set rsparts= nothing
set cnnparts=nothing
mycount = 0
'----------- remove duplicates INFO --------------------------------------------------------------------END
'for i=0 to unbound(partArray)
' unique = true
' dup_part = anArray(i)
' dup_mfg = AnArray2(i)
'
' if len(dup_part) > 1 then
'
' for j=0 to searchcounter
' if dup_part = partArray(0,j)then
' unique = false
'' unique = true
' end if
' next
'
' if unique = true then
' partArray(0,searchcounter) = dup_part & ""
' partArray(1,searchcounter) = dup_mfg & ""
' mycount = mycount +1
' end if
'
' end if
'next
'----------- Sort INFO --------------------------------------------------------------------
'none yet
'-----------------------------------------------------------------------------------------------
%>
<%=partArray(0,1) & " - " & partArray(1,1) & " : " & partArray(2,1)%>
<% if Request("btnsearch") & "" = "Search Inventory" or Request("btnleftnav" & "" ) = "Search Inventory" then %>
Gold Coast Semiconductor is ISO-9001:2000 and AS9120:2002 certified!
Please Click the Part Number to Order Online / Send RFQ, or call (631) 630-6511 to speak directly with one of our sales representatives. Looking for alternative parts to save money? Give us a call and let us find them for you.
<% end if %>
Gold Coast Semiconductor is ISO-9001:2000 and AS9120:2002 certified!
Gold Coast Semiconductor has an inventory of over 50,000 line items. To see if we have stock in the part number that you need, use
our Part Search capability. It's the most flexible and accurate system in the industry. You'll get a search
result even if you have only a partial part number.
Untitled Document