Debugging hint, please

Posted on 2006-03-28
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
Question by:mlagrange
    LVL 10

    Accepted Solution


    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)


    Author Comment

    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


    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Join & Write a Comment

    If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
    Introduction When many people think of the WebBrowser ( control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    24 Experts available now in Live!

    Get 1:1 Help Now