Postato originariamente da theprogrammer:
Se non mostri il codice che usi e non descrivi un po' l'architettura e il protocollo usati
come no volentieri
quando ad un client viene chiesto di fare una ricerca dei file il client esegue questo codice....
risultatiricerca = ""
If Combo1.text = "qualsiasi" Then
ElseIf Combo1.text = "video" Then
file(0) = ".3gp,.asf,.animgif,.avi,.divx,.swf,.mpeg,.mpg,.mp4v,.wmv,.qicktime,.mkv,.rm,.vob,.svi"
ElseIf Combo1.text = "immagini" Then
file(0) = ".bmp,.gif,.jpeg,.jpg,.pict,.png,.tga,.tiff,.djvu,.pcx"
ElseIf Combo1.text = "archivi" Then
file(0) = ".bz2,.gz,.tar,.zip,.jar,.rar,.7z,.ace,.arj,.arc,.bic,.cab,.hqx,.iso,.lha,.mdf,.sit,.zoo,.toast,.sitx"
ElseIf Combo1.text = "audio" Then
file(0) = ".aac,.ac3,.aiff,.amr,.bwf,.cda,.iff,.mid,.mka,.mp3,.riff,.quick time,.pca,.ra,.rm,.ogg,.wav,.wma,.xm"
End If
If Combo1.text <> "qualsiasi" Then
ricerca = Split(file(0), ",")
For Each parola3 In filecondivisi
par(0) = parola3
par(1) = Split(par(0), " ")(1 - 1) 'StripFileName(par(0))
nomefile = par(0)
fun "immagine in lista"
ricerca1 = Split(par(1), " ")
ricerca2 = Split(text(0).text, " ")
ricerca6() = Split(risricerca(tbs.Tabs.Count), "£££$$$@@@")
For a = LBound(ricerca) To UBound(ricerca)
For c = LBound(ricerca1) To UBound(ricerca1)
For d = LBound(ricerca2) To UBound(ricerca2)
'If LCase(ricerca1(c)) = ricerca2(d) Then '& ricerca(a) Then
If InStr(1, LCase(ricerca1(c)), ricerca2(d)) Then
If Right(par(1), Len(ricerca(a))) = ricerca(a) Then
'List1.AddItem par(0)
'risricerca(tbs.Tabs.Count) = risricerca(tbs.Tabs.Count) & Left(par(0), Len(par(0)) - Len(Split(par(0), " ")(4 - 1)) - 4) & "£££$$$@@@"
risultatiricerca = risultatiricerca & Left(par(0), Len(par(0)) - Len(Split(par(0), " ")(4 - 1)) - 4) & "£££$$$@@@" '& virtualip
End If
End If
Exit For
Next d
Next c
Next a
Next parola3
Else
For Each parola3 In filecondivisi
par(0) = parola3
par(1) = Split(par(0), " ")(1 - 1) 'StripFileName(par(0))
ricerca1 = Split(par(1), " ")
ricerca2 = Split(text(0).text, " ")
For c = LBound(ricerca1) To UBound(ricerca1)
For d = LBound(ricerca2) To UBound(ricerca2)
'If LCase(ricerca1(c)) = ricerca2(d) Then
If InStr(1, LCase(ricerca1(c)), ricerca2(d)) Then
'List1.AddItem par(0)
'risricerca(tbs.Tabs.Count) = risricerca(tbs.Tabs.Count) & Left(par(0), Len(par(0)) - Len(Split(par(0), " ")(4 - 1)) - 4) & "£££$$$@@@"
risultatiricerca = risultatiricerca & Left(par(0), Len(par(0)) - Len(Split(par(0), " ")(4 - 1)) - 4) & " " & virtualip & "£££$$$@@@" '& virtualip
End If
Exit For
Next d
Next c
Next parola3
End If
Ws.SendData "risultato ricerca" & "£££$$$@@@;;;" & risultatiricerca '& "£££$$$@@@;;;" & virtualip
l'errore me lo da' alla fine quando faccio il senddata......
l'errore che mi da' e':
errore di run-time '10040'