I want to open a DAO Recordset (C#) - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

I want to open a DAO Recordset (C#)

sgeelksgeelk Posts: 5Member
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

Comments

  • osaruman555osaruman555 Posts: 1Member
    Hi, how are you?
    well, well, well...
    you forgot to open Database.

    system don't know to use DB file where are from.
    OK?

    You should to use command, "OpenDatabase","Workspace", etc.

    (^o^)/

    : 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
    :
    :

Sign In or Register to comment.