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. VB 6 to VB.Net syntax...

VB 6 to VB.Net syntax...

Scheduled Pinned Locked Moved Visual Basic
csharpdatabasehelpquestion
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.
  • C Offline
    C Offline
    CCG3
    wrote on last edited by
    #1

    I am working with VB.Net 2005 and I am re-writing a small program that was in VB6 format. I currently have a Dataset looking at my Access database. In the old code it used these statements to look at the database. Public dbComp As DAO.Database Dim qdf As DAO.QueryDef Dim tdf As DAO.TableDef The routine that I am working with looks at the database (dbComp) and it deletes quries and creates them and then populates them. I am hoping that I can use my existing Dataset that I created instead of using these DAO connections. Can anyone help me out with this? I just need to know what I can use in .Net in place of those commands above. Thank you in advance for any help you can provide!

    P 1 Reply Last reply
    0
    • C CCG3

      I am working with VB.Net 2005 and I am re-writing a small program that was in VB6 format. I currently have a Dataset looking at my Access database. In the old code it used these statements to look at the database. Public dbComp As DAO.Database Dim qdf As DAO.QueryDef Dim tdf As DAO.TableDef The routine that I am working with looks at the database (dbComp) and it deletes quries and creates them and then populates them. I am hoping that I can use my existing Dataset that I created instead of using these DAO connections. Can anyone help me out with this? I just need to know what I can use in .Net in place of those commands above. Thank you in advance for any help you can provide!

      P Offline
      P Offline
      paas
      wrote on last edited by
      #2

      You can certainly use ADO.Net and OLEDB via DataSets and DataViews to retrieve, update, insert or delete records in an Access database from .Net. However, you can not use ADO.Net to create an Access database, or any of the objects (tables, queries, etc.) in an Access database. One way to create an Access database and table objects from .Net would be to first create references to, and corresponding InterOps for, Microsoft ActiveX Data Objects. I imagine that a google will turn up lots of examples on creating Access databases and tables from .Net after making the proper references to ActiveX Data Objects. Good luck with your project.

      T 1 Reply Last reply
      0
      • P paas

        You can certainly use ADO.Net and OLEDB via DataSets and DataViews to retrieve, update, insert or delete records in an Access database from .Net. However, you can not use ADO.Net to create an Access database, or any of the objects (tables, queries, etc.) in an Access database. One way to create an Access database and table objects from .Net would be to first create references to, and corresponding InterOps for, Microsoft ActiveX Data Objects. I imagine that a google will turn up lots of examples on creating Access databases and tables from .Net after making the proper references to ActiveX Data Objects. Good luck with your project.

        T Offline
        T Offline
        Thomas Stockwell
        wrote on last edited by
        #3

        Another way to create an Access database without all of that hassle: If you know the basic structure of the Access Database, then you create the basic 'template' in Access and then embed the database into your application. Then through the use of File.IO and Reflection you can stream the template to a local file for alteration. (It is simpler than it may sound).

        Regards, Thomas Stockwell Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. Visit my Blog

        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