none
Access 2007 db as datasource RRS feed

  • Question

  •  

    I am trying to use an Access database (.accdb) as a datasource in a Visual Studio 2005 Express, application but get an error saying it is an unrecognized database format.  Is there some way to use this file as a datasource?  Thanks for any help.
    Friday, October 19, 2007 5:27 PM

Answers

  • Step by step instructions. From the Add Connection dialog:

     

    1) Click the Change button for the Data Source

    2) From the Change Data Source dialog select <other> in the Data source list

    3) Click the OK button

    4) Back to the Add Connection dialog select Microsoft Offfice 12.0 Access Database Engine OLE DB Provider from the OLE DB Provider drop down

    5) In the Server or file name text box enter the path to your Access 2007 database file

    6) Click the Test Connection button to make certain that you can connect to the database

    7) Click on the OK button to finish creating the data source.

     

    Friday, October 19, 2007 6:16 PM

All replies

  • you should get the data first from the database by using OldDbDataReader object , then display it in your form using DataTable or OleDbDataAdaper what ever on a DataGridView control
    Friday, October 19, 2007 5:39 PM
  • Step by step instructions. From the Add Connection dialog:

     

    1) Click the Change button for the Data Source

    2) From the Change Data Source dialog select <other> in the Data source list

    3) Click the OK button

    4) Back to the Add Connection dialog select Microsoft Offfice 12.0 Access Database Engine OLE DB Provider from the OLE DB Provider drop down

    5) In the Server or file name text box enter the path to your Access 2007 database file

    6) Click the Test Connection button to make certain that you can connect to the database

    7) Click on the OK button to finish creating the data source.

     

    Friday, October 19, 2007 6:16 PM
  • Sorry to jump in, but what if there is no <other> in the data source list?  I just have Access Database File and SQL Server datbase file.

    Thanks.

    -Brian
    Tuesday, October 23, 2007 2:00 AM
  • There should be an <other> in the list. Which version of Visual Studio.NET are you using?

    Tuesday, October 23, 2007 12:56 PM
  • I'm using VB 2005 Express.  Version details below.  The method I'm using is Data -> Add New Datasource, Database, New Connection, Change button for Data Source.

    Thanks.

    -Brian

    --------------------------------------------------------

    Microsoft Visual Studio 2005
    Version 8.0.50727.42  (RTM.050727-4200)
    Microsoft .NET Framework
    Version 2.0.50727

    Installed Edition: VB Express

    Microsoft Visual Basic 2005   76541-000-0000011-00124
    Microsoft Visual Basic 2005
    Tuesday, October 23, 2007 7:41 PM
  • If I remember correctly the Express versions do not support other data sources when using the Data Source Configuration Wizard. Other data sources can only be created through code with the Express versions.
    Wednesday, October 24, 2007 12:50 PM