In a web project I am trying to run a simple query on a catalog off of our Microsoft Indexing server. I'm having a couple of problems.
#1 - The tutorials keep refering to a view inside the catalog, but my server admin doesn't know what that means. How do we find the view name?
#2 - The line: Return oCommand.ExecuteReader() returns this error;
Incorrect syntax near '-1.'. Expected end-of-file, ';', AS, CREATE, DOT, DOTDOT, DOTDOT_SCOPE, DOTDOTDOT, DOTDOTDOT_SCOPE, DROP, ORDER_BY, SELECT, SET, WHERE. SQLSTATE=42000
The query being executed is: SELECT * FROM PN-1.Powernet..Powernet;
where PN-1 is the server name and Powernet is the catalog name (Powernet.wci) and we just tried Powernet as the view name because we don't know what else to call the view.
Any ideas as to what is wrong with this part?
Here is my code:
PartialClass _Default Inherits System.Web.UI.Page
FunctionSearchIndex() As OleDbDataReader Using oConn As New OleDbConnection("Provider=MSIDXS;") Dim oCommand As New OleDbCommand("SELECT * FROM PN-1.Powernet..Powernet;")
oCommand.Connection = oConnTry
oConn.Open()Catch ex As Exception
Response.Write(ex)End Try Return oCommand.ExecuteReader() End Using
ProtectedSub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim sFieldName() As String Dim iIndexCount As Integer Dim rdrReader1 As OleDbDataReader = SearchIndex()
iIndexCount = rdrReader1.FieldCountFor i As Integer = 0 To iIndexCount
sFieldName(i) = rdrReader1.GetName(i)Next
The catalog is not in indexing server that comes with IIS but it is in the Microsoft search service which is required to run Fulltext query in SQL Server. If the above is not correct post a link to the tutorial so I can tell you if your implementation is technically sound or not. Hope this helps.
I got the link below but your application may break because you are running everything in IIS which is using Windows file system. The link includes all the configuration you need. Hope this helps.
Thanks! That did help. When following the instructions in the article you linked to I discovered that indexing was disabled. That would tend to explain why nothing worked.