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:
Imports
System.Data.OleDbPartial
Class _Default Inherits System.Web.UI.PageFunction
SearchIndex() As OleDbDataReader Using oConn As New OleDbConnection("Provider=MSIDXS;") Dim oCommand As New OleDbCommand("SELECT * FROM PN-1.Powernet..Powernet;")oCommand.Connection = oConn
TryoConn.Open()
Catch ex As ExceptionResponse.Write(ex)
End Try Return oCommand.ExecuteReader() End UsingEnd
FunctionProtected
Sub 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()rdrReader1.Read()
iIndexCount = rdrReader1.FieldCount
For i As Integer = 0 To iIndexCountsFieldName(i) = rdrReader1.GetName(i)
NextEnd
SubEnd
Class
![]() |
0 |
![]() |
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.
Kind regards,
Gift Peddie
![]() |
0 |
![]() |
Hi,
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.
http://support.microsoft.com/default.aspx?scid=kb;en-us;820105
Kind regards,
Gift Peddie
![]() |
1 |
![]() |
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.
![]() |
0 |
![]() |