Keyword not supported

C

Carl

Hi,

I have an ASP app that queries MS Indexing Service.

Below is my code.

#############################
Imports System
Imports System.Data.SqlClient

Dim strCatalog As String

' Catalog Name
strCatalog = "Test"

Dim connString As String
= "Provider=MSIDXS.1;Integrated Security .='';Data
Source='" & strCatalog & "'"

Dim conn As New SqlConnection(connString)
conn.Open()
################################

When I try to open the connection I get the message
"Exception Details: System.ArgumentException:
Keyword not supported: 'provider'."

Any help would be much appreciated.

tnx
carl
 
K

Kevin Cunningham

I have not used ado.net to access MS Indexing Service but my guess would be
that you should probably use the OLEDb namespace. When you use the
SqlClient namespace it implies sql server so a provider is not necessary.
Do something like:

Imports System
Imports System.Data.OleDb

Dim strCatalog As String

' Catalog Name
strCatalog = "Test"

Dim connString As String = "Provider=MSIDXS.1;Integrated Security
..='';Data Source='" & strCatalog & "'"

Dim conn As New OleDbConnection(connString)
conn.Open()
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top