Keyword not supported

  • Thread starter Thread starter Carl
  • Start date Start date
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
 
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()
 
Carl,

You're trying to use the Sql Server .NET Data Provider, but this will only
work with SQL Server. You should be using the OleDb .NET Data Provider
instead.
 
Back
Top