Problems with permissions on Query in VB.NET

  • Thread starter Thread starter flycast
  • Start date Start date
F

flycast

Guest
Hello:
I have the following query that works fine in the query editor in Access:
SELECT MSysObjects.Name, MSysObjects.Type
FROM MSysObjects
WHERE (((MSysObjects.Name) Not Like "MSys*") AND ((MSysObjects.Type)=1));

When I attempt to run the query with some code through an ODBC connection I get the following error:
ERROR [42000] [Microsoft][ODBC Microsoft Access Driver] Record(s) cannot be read; no read permission on 'MSysObjects'.

I can run other queries programatically without problems...any ideas?
 
When I attempt to run the query with some code through an ODBC connection

What is "some code"?
What ODBC connection?

A bit more info please...

RV
 
Code:
        SelectQuery = " SELECT MSysObjects.Name, MSysObjects.Type FROM SysObjects WHERE (((MSysObjects.Name) Not Like ""MSys*"") AND (MSysObjects.Type)=1))"
        SQLCommand = New OdbcCommand(SelectQuery, DBConnection)
        DataAdapter = New OdbcDataAdapter(SQLCommand)
        LabelsDataTable.TableName = "Test"
        DataAdapter.Fill(LabelsDataTable)
 
What ODBC connection?
An ODBC Connection between what?

RV
 

Users who are viewing this thread

Back
Top Bottom