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. C#
  4. Open DAO Recordset

Open DAO Recordset

Scheduled Pinned Locked Moved C#
databasehelp
2 Posts 2 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.
  • D Offline
    D Offline
    Daminda
    wrote on last edited by
    #1

    I want to open a DAO Recordset Database tempDB; Recordset rstbl; rstbl = tempDB.OpenRecordset("SELECT Name FROM myTblNames", DAO.RecordsetTypeEnum.dbOpenTable, DAO.RecordsetOptionEnum.dbReadOnly , DAO.LockTypeEnum.dbPessimistic ); Error is Invalid argument

    H 1 Reply Last reply
    0
    • D Daminda

      I want to open a DAO Recordset Database tempDB; Recordset rstbl; rstbl = tempDB.OpenRecordset("SELECT Name FROM myTblNames", DAO.RecordsetTypeEnum.dbOpenTable, DAO.RecordsetOptionEnum.dbReadOnly , DAO.LockTypeEnum.dbPessimistic ); Error is Invalid argument

      H Offline
      H Offline
      Heath Stewart
      wrote on last edited by
      #2

      Why are you using DAO? First of all, it was superceeded long ago by ADO. And since this is the C# forum, I can only assume you're using C#. So why aren't you using ADO.NET? It's a hell of a lot easier in .NET applications and has many benefits over plain ADO (like easy parameterized queries, data adapters, and more). You can find more information about ADO.NET in the .NET Framework SDK: Accessing Data using ADO.NET[^]. There's also several technical articles in MSDN with examples: ADO.NET[^].

      Microsoft MVP, Visual C# My Articles

      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