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. General Programming
  3. Visual Basic
  4. Ms Access

Ms Access

Scheduled Pinned Locked Moved Visual Basic
questioncsharphelp
4 Posts 4 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.
  • H Offline
    H Offline
    hoho_d0dol
    wrote on last edited by
    #1

    hi, what is the code for connecting VB.Net with Ms Access.? Anyone could help?? I'm really and very new into these things.. :sigh: thanx..

    C T 2 Replies Last reply
    0
    • H hoho_d0dol

      hi, what is the code for connecting VB.Net with Ms Access.? Anyone could help?? I'm really and very new into these things.. :sigh: thanx..

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      Search this site, or even google and there are tons of examples. If you're 'really new' then perhaps it's too soon to worry about databases, the world is filling with people who can make a pretty form in VB, and will never be programmers.

      Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog

      P 1 Reply Last reply
      0
      • C Christian Graus

        Search this site, or even google and there are tons of examples. If you're 'really new' then perhaps it's too soon to worry about databases, the world is filling with people who can make a pretty form in VB, and will never be programmers.

        Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog

        P Offline
        P Offline
        Paul Conrad
        wrote on last edited by
        #3

        Christian Graus wrote:

        the world is filling with people who can make a pretty form in VB, and will never be programmers.

        Very true :laugh:

        1 Reply Last reply
        0
        • H hoho_d0dol

          hi, what is the code for connecting VB.Net with Ms Access.? Anyone could help?? I'm really and very new into these things.. :sigh: thanx..

          T Offline
          T Offline
          Tyquaun Hunter
          wrote on last edited by
          #4

          I am certainly not going to damper your spirits and tell you not to strive for what you want. Look under the system.data namespace in MSDN library. This is the namespace where you can do all kinds of data manipulations using databases. There is something called an oledb provider. There for it should be system.data.oledb This is the only way you can access the Microsoft access database engine. You can use something like this 'OleDbConnection object used for connecting to a database Private _ConnectionObj As New OleDbConnection() 'OleDbCommand object used for executing a command Private _Command As OleDbCommand _connectionObj.ConnectionString = [Shared].ConnectionString _ConnectionObj.Open() _Command = New OleDbCommand("Select * From Registrants", _ConnectionObj) Where you see [Shared].ConnectionString, this is the string you should pass in Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Visual Studio Projects\AnnualMeetingRegistration\Database\Registrants.mdb;User Id=admin;Password=; Normally, you would want to store you connection string in the app.config file, but don't do that right now. Just use the string example I showed you. As you get more experienced, you will find better methodologies of programming. Then you open the connection object and pass the connection object to the command object. After, you have finished close the connection object. If you decide to use a data reader you will have to close that as well. Here is an excellent website for connection strings. http://www.connectionstrings.com/[^] I hope this helps, Tyquaun

          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