none beginners - error keyword not supported 'provider' RRS feed

  • Question

  • i try to connect access 2007 database file (temp.accdb) by using 2010

    error occured keyword not supported 'provider'. 


    "provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Documents and Settings\AOS\My Documents\temp.accdb;Persist Security


    Monday, August 13, 2012 6:27 AM


All replies

  • Hi Ashish,

    Welcome to the MSDN Forum.

    What kind of connection class do you use? SqlConnection

    Anyway, when you try to connect Access Database, please try oledbConnection, here is the cause: 

    When you are using a specific provider, you can not specify the Provider (as the provider-specificConnection object is the provider).  Remove the Provider value from your connection string.  If you are using the genericOleDbConnection then you should use the Provider value so ADO.NET knows what provider to instantiate.

    Best regards,

    Mike Feng
    MSDN Community Support | Feedback to us
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, August 14, 2012 2:09 AM
  • Hi, I am also getting this same error when my asp application has been uploaded to my host site. I am using Visual Studio 2010 with MS Access 2010.

    This is my connection string in my web.config file 

     <add name="ConTrakDB" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\inetpub\wwwroot\sj10abs\db\ConTrakDB.accdb;" />

    I use the below connections in aspx files 

                     <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
                        ConnectionString="<%$ ConnectionStrings:ConTrakConnection %>" 
                        ProviderName="<%$ ConnectionStrings:ConTrakConnection.ProviderName %>" 
                        SelectCommand="SELECT DISTINCT [Username] FROM [Timecards]"></asp:SqlDataSource>


     Dim oledbconn As New OleDb.OleDbConnection(ConfigurationManager.ConnectionStrings("ConTrakDB").ConnectionString) in the aspx.vb files. I have looked around at other forums for this error but cant find where I am using a SQLconnection other than the datasources in the aspx files. Could it be this causing the error?

    Many thanks 


    Monday, December 24, 2012 4:47 PM