1

I've found a way to grant select to admin by VBA command source

CurrentProject.Connection.Execute "GRANT SELECT ON MSysObjects TO Admin;"

But everytime I have to execute that in the Access. I want to execute that in my c++ code. I use the ADO + ATL COM way to operate the Access DB.

::CoInitialize(NULL);
    _RecordsetPtr m_pRecordset("ADODB.Recordset");
    _ConnectionPtr m_pConnection("ADODB.Connection");
    _bstr_t bstrSQL("select top 10 * from AppointmentStatus");  
    try
    {
        m_pConnection.CreateInstance("ADODB.Connection");
...
Erik A
  • 31,639
  • 12
  • 42
  • 67
Zhang
  • 3,030
  • 2
  • 14
  • 31

0 Answers0