Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. i want an ASP.NET connecting to MS Access using C# code

i want an ASP.NET connecting to MS Access using C# code

Scheduled Pinned Locked Moved ASP.NET
csharphelpasp-net
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    tayyar2003
    wrote on last edited by
    #1

    i am stuck in a project for web based applecation i need to have a sample code for connecting asp.net with MS Access bsed on the C# technology if any one can help i will be glad

    T 1 Reply Last reply
    0
    • T tayyar2003

      i am stuck in a project for web based applecation i need to have a sample code for connecting asp.net with MS Access bsed on the C# technology if any one can help i will be glad

      T Offline
      T Offline
      Thea Burger
      wrote on last edited by
      #2

      Have a look at ASP.Net [^]examples. Have Sql examples there, basically all you do is change all the 'sql' to 'oledb'. using System.Data.OleDb; OleDbConnection myConnection = new OleDbConnection( "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\somepath\mydb.mdb;Jet OLEDB:Database Password=MyDbPassword;"); OleDbCommand myCommand = new OleDbCommand("select * from Authors", myConnection); myConnection.Open(); OleDbDataReader dr = myCommand.ExecuteReader(); ... myConnection.Close(); As for connection strings, have a look at www.connectionstrings.com[^]. HTH, :)

      D 1 Reply Last reply
      0
      • T Thea Burger

        Have a look at ASP.Net [^]examples. Have Sql examples there, basically all you do is change all the 'sql' to 'oledb'. using System.Data.OleDb; OleDbConnection myConnection = new OleDbConnection( "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\somepath\mydb.mdb;Jet OLEDB:Database Password=MyDbPassword;"); OleDbCommand myCommand = new OleDbCommand("select * from Authors", myConnection); myConnection.Open(); OleDbDataReader dr = myCommand.ExecuteReader(); ... myConnection.Close(); As for connection strings, have a look at www.connectionstrings.com[^]. HTH, :)

        D Offline
        D Offline
        DotNet
        wrote on last edited by
        #3

        Regarding about the ASP.NET updating Ms Access Database. I try to change most of the System.Data.SqlClient thing to System.Data.OleDb. I still find the problem. Is there any solution?

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups