OleDb.Connection -- Index Server -- Visual Studio 2008 -- 'Format of the initialization string does not conform...' error RRS feed

  • Question

  • First - apologies if this is in the wrong forum, but it appears that there is no better place.

    Issue: When trying to establish an OleDbConnection using the MS Indexing Service, the following error is returned: "Format of the initialization strin does not conform to specification stating at index 0." The error is generated from C# ASP.NET 2.0 Framework in Visual Studio 2008 at the following stack call: System.Data.Common.DbConnectionOptions.GetKeyValuePair(...)

    All of the configuration and testing of Index Server is being conducted on a Window 2003 R2 Server and running VS 2008 in debug mode on the same server.

    The connection string definition and assignment follow:

    System.Data.OleDb.OleDbConnection oConn = new System.Data.OleDb.OleDbConnection();

    oConn.ConnectionString = "Provider= \"MSIDXS\";DataSource=\"Guides\";";

    The error is generated when setting the ConnectionString property/value.

    I have tried all permutations of the Provider/DataSource formatting - use of no quotes; use of single quotes; and use of MSIDXS.1 as the Provider.  I have reviewed information in - the registry values are present.

    So what is needed is the proper formatting to connect to the Indexing Service.

    Additionally, if I directly user the "Query the Catalog" function from the Indexing Service everything works fine, as I would expect it to - but there is no way to view an source information on the query form to validate the configuration from with Visual Studio 2008.

    O/S Information:

    Indexing Server version: 5.2.3790.3959

    Windows Server 2003 R2 version: 5.2 R2 (Build 3790.srv03_sp2_gdr.100216-1301: Service Pack 2)

    Any recomendations would be appreciated,

    James Putnam

    • Moved by SamAgain Wednesday, May 26, 2010 2:51 AM better fit (From:.NET Base Class Library)
    Tuesday, May 25, 2010 2:31 PM


  • Hi probably you did nothing wrong, but the connection string 'Data Source' part should be seperate from each other. like the following sample:

    oConn.ConnectionString = "Provider= \"MSIDXS\";Data Source=\"Guides\"";

    This is the correct way it should be.

    Tuesday, May 25, 2010 5:14 PM