MS Access

Last post 07-04-2008 1:25 PM by vinz. 2 replies.

Sort Posts:

  • MS Access

    07-04-2008, 12:06 AM
    • Member
      13 point Member
    • K.Arpitha
    • Member since 07-02-2008, 8:24 AM
    • Singapore
    • Posts 43

    How to connect Ms acess table for web application asp.net with C#..where and how i has to write code for connection

    can u give coding to connect to database..

  • Re: MS Access

    07-04-2008, 2:17 AM
    Answer
    • Contributor
      3,029 point Contributor
    • harrifer
    • Member since 06-28-2008, 9:53 PM
    • Katy, Texas
    • Posts 495

    create your connection string in web.config.

    <connectionStrings>
    <add name = "connectionName" connectionString = "Provider = Microsoft.Jet.OLEDB.4.0;Data Source = c:\test.mdb";providerName = "System.Data.OleDb" />
    <connectionStrings/>

    after you declare your connection in web.config add this to your page to get access to the connection.

    ConfigurationManager.ConnectionStrings["connectionName"].ConnectionString;

    To connect to Access you need to use Microsoft.Jet.OLEDB.4.0

     

    Try this it will work....

     

    Remember to mark as an answer...

     

     

    "Mark As Answer" If my reply helped you --
  • Re: MS Access

    07-04-2008, 1:25 PM
    Answer
    • All-Star
      91,698 point All-Star
    • vinz
    • Member since 10-05-2007, 11:47 AM
    • Cebu, Philippines
    • Posts 13,769
    • TrustedFriends-MVPs


    K.Arpitha:

    How to connect Ms acess table for web application asp.net with C#..where and how i has to write code for connection

    can u give coding to connect to database..



    Refer to the following links below for your references 

    http://www.beansoftware.com/ASP.NET-Tutorials/Connecting-Access-SQL-Server.aspx 

    http://www.aspfree.com/c/a/Microsoft-Access/Connecting-to-a-Microsoft-Access-database-with-ASPNET/1/ 

    http://www.tutorialized.com/tutorial/Connect-to-Access-Database-in-Visual-Studio-.NET/12440 

    "Code,Beer and Music ~ my way of being a programmer"

Page 1 of 1 (3 items)