We have a search page on our website that we made using ASP Classic on Windows Server 2003. Now we have migrated over to Windows Server 2012 and we need to make a new search page as the code will not work on Windows Server 2012 Search Service.
Has anyone come across this yet. I have been struggling trying to find good information on how to do this. If possible can someone show some coding examples on how this is done?
Thank you in advance.
<%
'Setup ADO objects.
Set adoCommand = CreateObject("ADODB.Command")
Set adoConnection = CreateObject("ADODB.Connection")
adoConnection.Open "Provider=Search.CollatorDSO;Extended Properties='Application=Windows';"
Set adoCommand.ActiveConnection = adoConnection
strQuery = "SELECT Top 1000 System.ItemPathDisplay FROM SYSTEMINDEX"
adoCommand.CommandText = strQuery
adoCommand.Properties("Page Size") = 10
adoCommand.Properties("Timeout") = 30
adoCommand.Properties("Cache Results") = False
' Run the query.
Set adoRecordset = adoCommand.Execute
adoRecordset.MoveFirst
Do Until adoRecordset.EOF
response.write(adoRecordset.Fields.Item("System.ItemPathDisplay")& "<br />")
adoRecordset.MoveNext
Loop
' Clean up.
adoRecordset.Close
adoConnection.Close
%>