Kan du få dette til at virke ?
Her er føst lidt kode :-------------------------------------------------------
If FindIP <> "" Or FindUsr <> "" Or DestHN <> "" Or DestIP <> "" Or ClientAgent <> "" Or DestPort <> "" Then
If FindIP <> "" Then
SQLOption = "ClientIP Like '%" & FindIP & "%'"
End If
If FindUsr <> "" Then
If SQLOption <> "" Then
SQLOption = (SQLOption) (" And ClientUserName Like '%" & FindUsr & "%'")
Else
SQLOption = "ClientUserName Like '%" & FindUsr & "%'"
End If
End If
If DestHN <> "" Then
If SQLOption <> "" Then
SQLOption = (SQLOption) (" And DestHost Like '%" & DestHN & "%'")
Else
SQLOption = "DestHost Like '%" & DestHN & "%'"
End If
End If
If DestIP <> "" Then
If SQLOption <> "" Then
SQLOption = (SQLOption) (" And DestHostIP Like '%" & DestIP & "%'")
Else
SQLOption = "DestHostIP Like '%" & DestIP & "%'"
End If
End If
If ClientAgent <> "" Then
If SQLOption <> "" Then
SQLOption = (SQLOption) (" And ClientAgent Like '%" & ClientAgent & "%'")
Else
SQLOption = "ClientAgent Like '%" & ClientAgent & "%'"
End If
End If
If DestPort <> "" Then
If SQLOption <> "" Then
SQLOption = (SQLOption) (" And DestHostPort Like '%" & DestPort & "%'")
Else
SQLOption = "DestHostPort Like '%" & DestPort & "%'"
End If
End If
Set myConn = Server.CreateObject("ADODB.Connection")
myConn.Open "DSN=DSN;UID=UID;PWD=PWD;DATABASE=IIS-Proxy;"
SQL = "select * from MspWinSockLog where " And (SQLOption) And " Order By ClientIP Desc"
-------------------------------------------------------------
mit problem er at jeg ikke kan få den til at søge rigtigt, jeg har fået af vidde at jeg skal prøve at afgrænse min sql søgning efter hvad der er indtastet i nogle felter, men jeg kan ikke rigtigt få det til at virke med SQLOption variablen, fejlen i min browser er her :
-----------------------------
Microsoft VBScript runtime error '800a000d'
Type mismatch: '[string: "select * from MspWin"]'
/WinSockLog.asp, line 146
------------------------------
Linie 146 er SQL sætningen
