Debugging hint, please

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:
      "cmd.Fill(testDataSet)"

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

Thanks

Mark

***

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()

        cmd.Fill(testDataSet)

        ' 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
        DataGrid1.DataBind()
    End Sub

End Class
mlagrangeAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

RichardCorrieCommented:

you need to add

cn.open

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

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

/Richard
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mlagrangeAuthor Commented:
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

0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.