We help IT Professionals succeed at work.

Debugging hint, please

mlagrange asked
Medium Priority
Last Modified: 2010-04-23
Hello - I found the code example below of ASP.NET v1.0 form code, and have tried to convert ot to v2.0, but I'm getting the following error message:
      "Service not started"

on the line:

Can someone please tip me off as to what is wrong?




Partial Class WebForm1
    Inherits System.Web.UI.Page
    Protected WithEvents OleDbConnection1 As System.Data.OleDb.OleDbConnection

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim strCatalog As String

        ' Catalog Name
        strCatalog = "TestCatalog"

        Dim strQuery As String
        strQuery = "Select DocTitle,Filename,Size,PATH,URL from SCOPE() where FREETEXT('" & TextBox1.Text & "')"
        ' TextBox1.Text is word that you type in the text box to query by using Index Service.
        Dim connString As String = "Provider=MSIDXS.1;Integrated Security .='';Data Source='" & strCatalog & "'"

        Dim cn As New System.Data.OleDb.OleDbConnection(connString)
        Dim cmd As New System.Data.OleDb.OleDbDataAdapter(strQuery, cn)
        Dim testDataSet As New Data.DataSet()


        ' Bind DataGrid to the DataSet. DataGrid is the ID for the
        ' DataGrid control in the HTML section.
        Dim source As New Data.DataView(testDataSet.Tables(0))
        DataGrid1.DataSource = source
    End Sub

End Class
Watch Question

you need to add


the best place is between the connection definition and the cmd definition; thus

        Dim cn As New System.Data.OleDb.OleDbConnection(connString)
        Dim cmd As New System.Data.OleDb.OleDbDataAdapter(strQuery, cn)


Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts


It just dawned on me what the problem is/was. I had not set up the Indexing Service to start with the pc startup. THAT was the "service" that was not running.

Then I realized I needed to change strCatalog to be the actual catalog name

It's working now...

Thanks for your reply

Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.