locked
Can I create an Access Data Source from a sharepoint site? RRS feed

  • Question

  • User1681486389 posted

    So I've created an asp.net web application on the same server the sharepoint site is located on. If I create an Access view of a list on the sharepoint site, which will then create an Access Database, can I then use that Access database in an access data source in my web application?


    If not, what's the best method of attack to access sharepoint list data from thisasp.net app?


    Thanks.

    Monday, July 5, 2010 10:04 PM

Answers

  • User-1618234021 posted

    ODBC Data Source can be created easily. Go to Control Panel -> Administrative Tools. There, you will find Data Sources(ODBC). Double click it and you will have a dialog.

    Here you can create a user dsn or system dsn. Click Add button and select Microsoft Access Driver(*.mdb, *.accdb). Then just follow the steps and point this dsn to the path of access database correctly.

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, July 7, 2010 3:09 AM
  • User-1199946673 posted

    ODBC Data Source can be created easily
     

    Yes they can. But in a web environment it is recommended to use OleDb rather than ODBC:

    http://www.mikesdotnetting.com/Article/78/AccessDataSource-SqlDataSource-and-connecting-to-Access-databases-in-ASP.NET

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, July 7, 2010 2:26 PM

All replies

  • User-1618234021 posted

    The answer is, YOU CAN. But you have to do it indirectly. In this case, the Access Database format is .accdb (2007 format) which can not be saved as 2003 format. AccessDataSource requires .mdb file. Which in this case, we do n't have.

    So you need to create an odbc Data Source on the same system using Access (.accdb) data provider. Then on your ASP.NET page in web application, put a SqlDataSource and configure it to use ODBC data sources. Select your data source created earlier.

    During the configuration wizard, you might not be able to see the tables in access database, if you have created linked tables. No problems, just specify your own SQL Select statement and test it. Later on you can put a GridView to bind with this SqlDataSource to see the data.

    Tuesday, July 6, 2010 3:31 AM
  • User1681486389 posted

    Thanks a lot for answering. How do I create the odbc data source, and do I create it in the same directory as the .accdb file?

    Tuesday, July 6, 2010 8:24 PM
  • User-1618234021 posted

    ODBC Data Source can be created easily. Go to Control Panel -> Administrative Tools. There, you will find Data Sources(ODBC). Double click it and you will have a dialog.

    Here you can create a user dsn or system dsn. Click Add button and select Microsoft Access Driver(*.mdb, *.accdb). Then just follow the steps and point this dsn to the path of access database correctly.

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, July 7, 2010 3:09 AM
  • User-1199946673 posted

    ODBC Data Source can be created easily
     

    Yes they can. But in a web environment it is recommended to use OleDb rather than ODBC:

    http://www.mikesdotnetting.com/Article/78/AccessDataSource-SqlDataSource-and-connecting-to-Access-databases-in-ASP.NET

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, July 7, 2010 2:26 PM